LLVM 20.0.0git
|
#include "llvm/Transforms/Scalar/ConstantHoisting.h"
Public Member Functions | |
PreservedAnalyses | run (Function &F, FunctionAnalysisManager &AM) |
bool | runImpl (Function &F, TargetTransformInfo &TTI, DominatorTree &DT, BlockFrequencyInfo *BFI, BasicBlock &Entry, ProfileSummaryInfo *PSI) |
Optimize expensive integer constants in the given function. | |
void | cleanup () |
Public Member Functions inherited from llvm::PassInfoMixin< ConstantHoistingPass > | |
void | printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName) |
Additional Inherited Members | |
Static Public Member Functions inherited from llvm::PassInfoMixin< ConstantHoistingPass > | |
static StringRef | name () |
Gets the name of the pass we are mixed into. | |
Definition at line 126 of file ConstantHoisting.h.
|
inline |
Definition at line 135 of file ConstantHoisting.h.
References llvm::SmallVectorImpl< T >::clear().
Referenced by runImpl().
PreservedAnalyses ConstantHoistingPass::run | ( | Function & | F, |
FunctionAnalysisManager & | AM | ||
) |
Definition at line 964 of file ConstantHoisting.cpp.
References llvm::PreservedAnalyses::all(), ConstHoistWithBlockFrequency, F, llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getResult(), llvm::PreservedAnalyses::preserveSet(), and runImpl().
bool ConstantHoistingPass::runImpl | ( | Function & | F, |
TargetTransformInfo & | TTI, | ||
DominatorTree & | DT, | ||
BlockFrequencyInfo * | BFI, | ||
BasicBlock & | Entry, | ||
ProfileSummaryInfo * | PSI | ||
) |
Optimize expensive integer constants in the given function.
Definition at line 922 of file ConstantHoisting.cpp.
References cleanup(), llvm::SmallVectorBase< Size_T >::empty(), llvm::Function::getContext(), llvm::Function::getDataLayout(), llvm::IRPass, and llvm::shouldOptimizeForSize().
Referenced by run().