LLVM
8.0.1
|
A pass to simplify and canonicalize the CFG of a function. More...
#include "llvm/Transforms/Scalar/SimplifyCFG.h"
Public Member Functions | |
SimplifyCFGPass () | |
The default constructor sets the pass options to create canonical IR, rather than optimal IR. More... | |
SimplifyCFGPass (const SimplifyCFGOptions &PassOptions) | |
Construct a pass with optional optimizations. More... | |
PreservedAnalyses | run (Function &F, FunctionAnalysisManager &AM) |
Run the pass over the function. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from llvm::PassInfoMixin< SimplifyCFGPass > | |
static StringRef | name () |
Gets the name of the pass we are mixed into. More... | |
A pass to simplify and canonicalize the CFG of a function.
This pass iteratively simplifies the entire CFG of a function. It may change or remove control flow to put the CFG into a canonical form expected by other passes of the mid-level optimizer. Depending on the specified options, it may further optimize control-flow to create non-canonical forms.
Definition at line 30 of file SimplifyCFG.h.
|
inline |
The default constructor sets the pass options to create canonical IR, rather than optimal IR.
That is, by default we bypass transformations that are likely to improve performance but make analysis for other passes more difficult.
Definition at line 38 of file SimplifyCFG.h.
SimplifyCFGPass::SimplifyCFGPass | ( | const SimplifyCFGOptions & | PassOptions | ) |
Construct a pass with optional optimizations.
Definition at line 200 of file SimplifyCFGPass.cpp.
References llvm::SimplifyCFGOptions::BonusInstThreshold, llvm::SimplifyCFGOptions::ConvertSwitchToLookupTable, llvm::SimplifyCFGOptions::ForwardSwitchCondToPhi, llvm::SimplifyCFGOptions::NeedCanonicalLoop, llvm::SimplifyCFGOptions::SinkCommonInsts, UserBonusInstThreshold, UserForwardSwitchCond, UserKeepLoops, UserSinkCommonInsts, and UserSwitchToLookup.
PreservedAnalyses SimplifyCFGPass::run | ( | Function & | F, |
FunctionAnalysisManager & | AM | ||
) |
Run the pass over the function.
Definition at line 218 of file SimplifyCFGPass.cpp.
References llvm::SimplifyCFGOptions::AC, llvm::AnalysisUsage::addPreserved(), llvm::AnalysisUsage::addRequired(), llvm::PreservedAnalyses::all(), llvm::SimplifyCFGOptions::BonusInstThreshold, llvm::SimplifyCFGOptions::ConvertSwitchToLookupTable, F(), llvm::SimplifyCFGOptions::ForwardSwitchCondToPhi, function, llvm::PassRegistry::getPassRegistry(), llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getResult(), INITIALIZE_PASS_BEGIN(), INITIALIZE_PASS_DEPENDENCY, llvm::initializeCFGSimplifyPassPass(), llvm::SimplifyCFGOptions::NeedCanonicalLoop, llvm::PreservedAnalyses::preserve(), runOnFunction(), simplifyFunctionCFG(), SinkCommon, llvm::SimplifyCFGOptions::SinkCommonInsts, Threshold, UserBonusInstThreshold, UserForwardSwitchCond, UserKeepLoops, UserSinkCommonInsts, and UserSwitchToLookup.
Referenced by SimplifyCFGPass().