I have a pass that parses the entire module (using runOnFunction() ). But I want to apply it on every path of execution. Along the way, I mean a sequence of instructions, starting from the point in the program (annotated from the beginning) to the point of completion of the program (annotated with the end).
I assume that I need to divide my module into functions by building CallGraph and then dividing each function into commands for building CFG-s in the nodes of the previous CallGraph mentioned. I assume that the execution paths from node that I select are all paths ending in the output of CallGraph (I should be able to communicate between CFGs). From this node, I see all the paths using the graph search algorithm.
Is it possible to replace the runOnFunction() / runOnModule() method runOnFunction() what is defined by the user, for example runOnExecutionPath() ? And if so, does LLVM have a structure that is suitable for storing execution paths? Another possibility would be to use getAnalysis<CallGraph> or getAnalysis<CFG> ? I'm confused.
Thanks so much for any advice!
user2022455
source share