LLVM 24.0.0git
llvm::GVNPass Class Reference

The core GVN pass object. More...

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

Inheritance diagram for llvm::GVNPass:
[legend]

Classes

struct  AvailableValue
 Represents a particular available value that we know how to materialize. More...
struct  AvailableValueInBlock
 Represents an AvailableValue which can be rematerialized at the end of the associated BasicBlock. More...
struct  Expression
class  ValueTable
 This class holds the mapping between values and value numbers. More...

Public Member Functions

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

Friends

class GVNLegacyPass
struct DenseMapInfo< Expression >

Additional Inherited Members

Static Public Member Functions inherited from llvm::OptionalPassInfoMixin< GVNPass >
static bool isRequired ()
Static Public Member Functions inherited from llvm::PassInfoMixin< GVNPass >
static bool isRequired ()
Static Public Member Functions inherited from llvm::detail::InfoMixin< 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 123 of file GVN.h.

Constructor & Destructor Documentation

◆ GVNPass()

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

Member Function Documentation

◆ getAliasAnalysis()

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

Definition at line 145 of file GVN.h.

◆ getDominatorTree()

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

Definition at line 144 of file GVN.h.

Referenced by constructSSAForLoadSet().

◆ getMemDep()

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

Definition at line 146 of file GVN.h.

◆ isLoadInLoopPREEnabled()

bool GVNPass::isLoadInLoopPREEnabled ( ) const

Definition at line 862 of file GVN.cpp.

References GVNEnableLoadInLoopPRE.

◆ isLoadPREEnabled()

bool GVNPass::isLoadPREEnabled ( ) const

Definition at line 858 of file GVN.cpp.

References GVNEnableLoadPRE.

◆ isLoadPRESplitBackedgeEnabled()

bool GVNPass::isLoadPRESplitBackedgeEnabled ( ) const

Definition at line 866 of file GVN.cpp.

References GVNEnableSplitBackedgeInLoadPRE.

◆ isMemDepEnabled()

bool GVNPass::isMemDepEnabled ( ) const

Definition at line 871 of file GVN.cpp.

References GVNEnableMemDep.

Referenced by run().

◆ isMemorySSAEnabled()

bool GVNPass::isMemorySSAEnabled ( ) const

Definition at line 875 of file GVN.cpp.

References GVNEnableMemorySSA.

Referenced by run().

◆ isScalarPREEnabled()

bool GVNPass::isScalarPREEnabled ( ) const

Definition at line 854 of file GVN.cpp.

References GVNEnableScalarPRE.

◆ printPipeline()

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

Definition at line 911 of file GVN.cpp.

References printPipeline().

Referenced by printPipeline().

◆ run()

◆ salvageAndRemoveInstruction()

void GVNPass::salvageAndRemoveInstruction ( Instruction * I)

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

Definition at line 931 of file GVN.cpp.

References I, llvm::salvageDebugInfo(), and llvm::salvageKnowledge().

◆ DenseMapInfo< Expression >

friend struct DenseMapInfo< Expression >
friend

Definition at line 245 of file GVN.h.

References GVNLegacyPass.

◆ GVNLegacyPass

friend class GVNLegacyPass
friend

Definition at line 245 of file GVN.h.

Referenced by llvm::createGVNPass(), llvm::createGVNPass(), and DenseMapInfo< Expression >.


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