Displaying 1 result from an estimated 1 matches for "fentryblock".
Did you mean:
entryblock
2016 Oct 26
0
How does one reduce a function CFG to its entry block?
Hello,
I wish to reduce a function CFG to its entry block. I wrote the following code using lib/IR/Function.cpp/Function::dropAllReferences() (from llvm-3.6) as reference:
Function *F; // Suitably initialized. BasicBlock *FEntryBlock = &F->getEntryBlock(); FEntryBlock->getTerminator()->eraseFromParent(); FEntryBlock->removeFromParent(); for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I) I->dropAllReferences(); while (!F->getBasicBlockList().empty()) F->getBasicBlockList().begi...