Hello, I'm writing a Function Pass. This function pass needs access to the CallGraph and CallGraph SCCs. Is there any way I can get CallGraph information without changing my pass to a CallGraphSCCPass ? Thanks, -- Nick Johnson
On 2009-05-10 20:11, Nick Johnson wrote:> Hello, > > I'm writing a Function Pass. This function pass needs access to the > CallGraph and CallGraph SCCs. Is there any way I can get CallGraph > information without changing my pass to a CallGraphSCCPass ?Does getAnalysis<CallGraph>() work? But I'm not sure if using a FunctionPass to access Callgraph data is a good idea, transformations can change it (for example dead code elimination can remove edges). Best regards, --Edwin
On 5/10/09, Török Edwin <edwintorok at gmail.com> wrote:> On 2009-05-10 20:11, Nick Johnson wrote: > > Hello, > > > > I'm writing a Function Pass. This function pass needs access to the > > CallGraph and CallGraph SCCs. Is there any way I can get CallGraph > > information without changing my pass to a CallGraphSCCPass ? > > > Does getAnalysis<CallGraph>() work? >AFAIK, it's not a pass.> But I'm not sure if using a FunctionPass to access Callgraph data is a > good idea, transformations can > change it (for example dead code elimination can remove edges). >I'm just using it to interpret profiling information correctly; in that respect, it doesn't matter if transformations change the IR, so long as the CallGraph data reflects the IR against which profiling was done. Nick
Maybe Matching Threads
- [LLVMdev] Get the call graph SCCs from a function pass
- [LLVMdev] Get the call graph SCCs from a function pass
- [LLVMdev] FunctionPass requiring SCCs
- [LLVMdev] Get the call graph SCCs from a function pass
- [LLVMdev] Processing functions in call graph SCC "order" with function-level analyses