LLVM  16.0.0git
Classes | Public Member Functions | Friends | List of all members
llvm::GVNPass Class Reference

The core GVN pass object. More...

#include "llvm/Transforms/Scalar/GVN.h"

Inheritance diagram for llvm::GVNPass:
Inheritance graph
Collaboration diagram for llvm::GVNPass:
Collaboration graph


struct  Expression
class  ValueTable
 This class holds the mapping between values and value numbers. More...

Public Member Functions

 GVNPass (GVNOptions Options={})
PreservedAnalyses run (Function &F, FunctionAnalysisManager &AM)
 Run the pass over the function. More...
void printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)
void markInstructionForDeletion (Instruction *I)
 This removes the specified instruction from our various maps and marks it for deletion. More...
DominatorTreegetDominatorTree () const
AAResultsgetAliasAnalysis () const
MemoryDependenceResultsgetMemDep () const
bool isPREEnabled () const
bool isLoadPREEnabled () const
bool isLoadInLoopPREEnabled () const
bool isLoadPRESplitBackedgeEnabled () const
bool isMemDepEnabled () const
- Public Member Functions inherited from llvm::PassInfoMixin< GVNPass >
void printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)


class gvn::GVNLegacyPass
struct DenseMapInfo< Expression >

Additional Inherited Members

- Static Public Member Functions inherited from llvm::PassInfoMixin< GVNPass >
static StringRef name ()
 Gets the name of the pass we are mixed into. More...

Detailed Description

The core GVN pass object.

FIXME: We should have a good summary of the GVN algorithm implemented by this particular pass here.

Definition at line 116 of file GVN.h.

Constructor & Destructor Documentation

◆ GVNPass()

llvm::GVNPass::GVNPass ( GVNOptions  Options = {})

Definition at line 122 of file GVN.h.

Member Function Documentation

◆ getAliasAnalysis()

AAResults* llvm::GVNPass::getAliasAnalysis ( ) const

Definition at line 138 of file GVN.h.

References llvm::GVNPass::ValueTable::getAliasAnalysis().

◆ getDominatorTree()

DominatorTree& llvm::GVNPass::getDominatorTree ( ) const

◆ getMemDep()

MemoryDependenceResults& llvm::GVNPass::getMemDep ( ) const

Definition at line 139 of file GVN.h.

Referenced by llvm::gvn::AvailableValue::MaterializeAdjustedValue().

◆ isLoadInLoopPREEnabled()

bool GVNPass::isLoadInLoopPREEnabled ( ) const

Definition at line 702 of file GVN.cpp.

References GVNEnableLoadInLoopPRE, and Options.

◆ isLoadPREEnabled()

bool GVNPass::isLoadPREEnabled ( ) const

Definition at line 698 of file GVN.cpp.

References GVNEnableLoadPRE, and Options.

◆ isLoadPRESplitBackedgeEnabled()

bool GVNPass::isLoadPRESplitBackedgeEnabled ( ) const

Definition at line 706 of file GVN.cpp.

References GVNEnableSplitBackedgeInLoadPRE, and Options.

◆ isMemDepEnabled()

bool GVNPass::isMemDepEnabled ( ) const

Definition at line 711 of file GVN.cpp.

References GVNEnableMemDep, and Options.

◆ isPREEnabled()

bool GVNPass::isPREEnabled ( ) const

Definition at line 694 of file GVN.cpp.

References GVNEnablePRE, and Options.

◆ markInstructionForDeletion()

void llvm::GVNPass::markInstructionForDeletion ( Instruction I)

This removes the specified instruction from our various maps and marks it for deletion.

Definition at line 132 of file GVN.h.

References llvm::GVNPass::ValueTable::erase(), and I.

◆ printPipeline()

void GVNPass::printPipeline ( raw_ostream OS,
function_ref< StringRef(StringRef)>  MapClassName2PassName 

Definition at line 743 of file GVN.cpp.

References llvm::None, and Options.

◆ run()

PreservedAnalyses GVNPass::run ( Function F,
FunctionAnalysisManager AM 

Friends And Related Function Documentation

◆ DenseMapInfo< Expression >

friend struct DenseMapInfo< Expression >

Definition at line 218 of file GVN.h.

◆ gvn::GVNLegacyPass

friend class gvn::GVNLegacyPass

Definition at line 217 of file GVN.h.

The documentation for this class was generated from the following files: