[LLVMdev] CFG Customization

rubiano rubiano at lipn.univ-paris13.fr
Thu Mar 12 04:41:42 PDT 2015

Hi all,

I'm discovering LLVM and I want to build a customized CFG with 
customized nodes (here BasicBlocks).
Simply, the purpose is to enrich CFG with some other informations.
What is the best way to do that ?

Please, tell me if I'm wrong (I'm not familiar enough with c++) but I 
understand that :
- CFG is a GraphTraits<BasicBlock*>
- it's not allowed to inherit from BasicBlock (never seen in the 

Maybe it's better to create a new class (like MachineBasicBlock) that 
contains a pointer to its BasicBlock ?
But this option requires to rewrite similar lines of code, right ?



More information about the llvm-dev mailing list