21 #define DEBUG_TYPE "flattencfg"
55 bool LocalChange =
true;
66 Changed |= LocalChange;
71 bool FlattenCFGPass::runOnFunction(
Function &
F) {
72 AA = &getAnalysis<AliasAnalysis>();
73 bool EverChanged =
false;
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
AnalysisUsage & addRequired()
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
bool FlattenCFG(BasicBlock *BB, AliasAnalysis *AA=nullptr)
FlatternCFG - This function is used to flatten a CFG.
FunctionPass * createFlattenCFGPass()
Represent the analysis usage information of a pass.
FunctionPass class - This class is used to implement most global optimizations.
#define INITIALIZE_AG_DEPENDENCY(depName)
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
bool removeUnreachableBlocks(Function &F)
Remove all blocks that can not be reached from the function's entry.
void initializeFlattenCFGPassPass(PassRegistry &)