21 #define DEBUG_TYPE "flattencfg"
55 bool LocalChange =
true;
66 Changed |= LocalChange;
71 bool FlattenCFGPass::runOnFunction(
Function &
F) {
72 AA = &getAnalysis<AAResultsWrapperPass>().getAAResults();
73 bool EverChanged =
false;
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
AnalysisUsage & addRequired()
#define INITIALIZE_PASS_DEPENDENCY(depName)
bool FlattenCFG(BasicBlock *BB, AliasAnalysis *AA=nullptr)
This function is used to flatten a CFG.
FunctionPass * createFlattenCFGPass()
Represent the analysis usage information of a pass.
INITIALIZE_PASS_END(RegBankSelect, DEBUG_TYPE,"Assign register bank of generic virtual registers", false, false) RegBankSelect
FunctionPass class - This class is used to implement most global optimizations.
static bool iterativelyFlattenCFG(Function &F, AliasAnalysis *AA)
iterativelyFlattenCFG - Call FlattenCFG on all the blocks in the function, iterating until no more ch...
INITIALIZE_PASS_BEGIN(FlattenCFGPass,"flattencfg","Flatten the CFG", false, false) INITIALIZE_PASS_END(FlattenCFGPass
Iterator for intrusive lists based on ilist_node.
bool removeUnreachableBlocks(Function &F, LazyValueInfo *LVI=nullptr)
Remove all blocks that can not be reached from the function's entry.
A wrapper pass to provide the legacy pass manager access to a suitably prepared AAResults object...
void initializeFlattenCFGPassPass(PassRegistry &)