[LLVMdev] applying a pass only on execution paths

Alexandru Ionut Diaconescu cyrusthevirus001x at yahoo.com
Tue Mar 12 08:32:55 PDT 2013

Hello everyone,

I have a pass that is analyzing the entire module (using runOnFunction()). But I want to apply it on each execution path. 

 assume I have to divide my module into functions by constructing a 
CallGraph and then divide every function into instructions by 
construction CFG-s in the nodes of the previous mentioned CallGraph. I 
assume that the execution paths from a node that I choose are all the 
paths finishing in the CallGraph leaves (I should be able to communicate
 between CFG-s). From that node I can see all the paths by using a graph
 search algorithm. 

Is there a possibility to replace the runOnFunction() / 
runOnModule() method with something user defined, like 
runOnExecutionPath() ? And if so, there is in LLVM a structure that is 
appropriate to store execution paths?  

Another possibility can be to use getAnalysis<CallGraph> or getAnalysis<CFG>? I am confused. 

Thank you a lot for any advice !

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130312/9b69eb2c/attachment.html>

More information about the llvm-dev mailing list