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

The core GVN pass object. More...

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

Inheritance diagram for llvm::GVN:
Inheritance graph
Collaboration diagram for llvm::GVN:
Collaboration graph


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

Public Member Functions

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

Constructor & Destructor Documentation

◆ GVN()

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

Definition at line 124 of file GVN.h.

Member Function Documentation

◆ getAliasAnalysis()

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

Definition at line 140 of file GVN.h.

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

◆ getDominatorTree()

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

Definition at line 139 of file GVN.h.

Referenced by ConstructSSAForLoadSet().

◆ getMemDep()

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

Definition at line 141 of file GVN.h.

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

◆ isLoadInLoopPREEnabled()

bool GVN::isLoadInLoopPREEnabled ( ) const

Definition at line 645 of file GVN.cpp.

References GVNEnableLoadInLoopPRE, and Options.

◆ isLoadPREEnabled()

bool GVN::isLoadPREEnabled ( ) const

Definition at line 641 of file GVN.cpp.

References GVNEnableLoadPRE, and Options.

◆ isLoadPRESplitBackedgeEnabled()

bool GVN::isLoadPRESplitBackedgeEnabled ( ) const

Definition at line 649 of file GVN.cpp.

References GVNEnableSplitBackedgeInLoadPRE, and Options.

◆ isMemDepEnabled()

bool GVN::isMemDepEnabled ( ) const

Definition at line 654 of file GVN.cpp.

References GVNEnableMemDep, and Options.

◆ isPREEnabled()

bool GVN::isPREEnabled ( ) const

Definition at line 637 of file GVN.cpp.

References GVNEnablePRE, and Options.

◆ markInstructionForDeletion()

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

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

Definition at line 134 of file GVN.h.

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

◆ printPipeline()

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

Definition at line 686 of file GVN.cpp.

References llvm::None, and Options.

◆ run()

PreservedAnalyses GVN::run ( Function F,
FunctionAnalysisManager AM 

Friends And Related Function Documentation

◆ DenseMapInfo< Expression >

friend struct DenseMapInfo< Expression >

Definition at line 219 of file GVN.h.

◆ gvn::GVNLegacyPass

friend class gvn::GVNLegacyPass

Definition at line 218 of file GVN.h.

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