LLVM 20.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
[legend]

Classes

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.
 
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.
 
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)
 

Friends

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.
 

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 117 of file GVN.h.

Constructor & Destructor Documentation

◆ GVNPass()

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

Definition at line 123 of file GVN.h.

Member Function Documentation

◆ getAliasAnalysis()

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

Definition at line 139 of file GVN.h.

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

◆ getDominatorTree()

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

Definition at line 138 of file GVN.h.

Referenced by ConstructSSAForLoadSet().

◆ getMemDep()

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

Definition at line 140 of file GVN.h.

◆ isLoadInLoopPREEnabled()

bool GVNPass::isLoadInLoopPREEnabled ( ) const

Definition at line 803 of file GVN.cpp.

References llvm::GVNOptions::AllowLoadInLoopPRE, and GVNEnableLoadInLoopPRE.

◆ isLoadPREEnabled()

bool GVNPass::isLoadPREEnabled ( ) const

Definition at line 799 of file GVN.cpp.

References llvm::GVNOptions::AllowLoadPRE, and GVNEnableLoadPRE.

◆ isLoadPRESplitBackedgeEnabled()

bool GVNPass::isLoadPRESplitBackedgeEnabled ( ) const

◆ isMemDepEnabled()

bool GVNPass::isMemDepEnabled ( ) const

Definition at line 812 of file GVN.cpp.

References llvm::GVNOptions::AllowMemDep, and GVNEnableMemDep.

Referenced by run().

◆ isPREEnabled()

bool GVNPass::isPREEnabled ( ) const

Definition at line 795 of file GVN.cpp.

References llvm::GVNOptions::AllowPRE, and GVNEnablePRE.

◆ markInstructionForDeletion()

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

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

Definition at line 133 of file GVN.h.

References llvm::GVNPass::ValueTable::erase(), I, and llvm::SmallVectorTemplateBase< T, bool >::push_back().

◆ printPipeline()

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

◆ run()

PreservedAnalyses GVNPass::run ( Function F,
FunctionAnalysisManager AM 
)

Friends And Related Function Documentation

◆ DenseMapInfo< Expression >

friend struct DenseMapInfo< Expression >
friend

Definition at line 218 of file GVN.h.

◆ gvn::GVNLegacyPass

friend class gvn::GVNLegacyPass
friend

Definition at line 218 of file GVN.h.

Referenced by llvm::createGVNPass().


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