search for: cfgbuilder

Displaying 2 results from an estimated 2 matches for "cfgbuilder".

Did you mean: cfgbuild
2012 Oct 07
2
[LLVMdev] getting pointer to CFG object for any given C program
...end/AnalysisConsumer.cpp:472 - AnalysisConsumer::HandleCode(Decl *D, AnalysisMode Mode, SetOfConstDecls *VisitedCallees) /usr/home3/rks/llvm/llvm-3.1.src/tools/clang/lib/Analysis/CFG.cpp:3166 - CFG* CFG::buildCFG(const Decl *D, Stmt *Statement, ASTContext *C, const BuildOptions &BO) { CFGBuilder Builder(C, BO); return Builder.buildCFG(D, Statement); } I have tried to debug clang using gdb (by running r -cc1 -analyze -analyser-checker=Debug.DumpCFG hello.c from within gdb) and now I know something about flow but exactly not able to figure out how to get pointer to CFG object in my...
2017 Jun 27
3
Testing utility for building and updating CFG
...Insert and edge from foo to bar. d if if.then // Delete the edge from if to if.then. i if bar // Insert an edge from if to bar. Under the hood, the utility would build IR with just switch instructions. Then you could assign it to a string and use in a unit test: CFGBuilder B(MyString); Function *F = B.getFunction(); … while (!B.finished()) { Update U = B.applyNextUpdate(); // B changes the CFG. // U stores type of update (insertion/deletion) and a pair of BB’s // (From and To). doSomethingWithTheUpdate(U); } Other CFG passes (e.g. LoopInfo, NewGVN) cou...