[LLVMdev] Get the call graph SCCs from a function pass
Nick Johnson
nicholas.paul.johnson at gmail.com
Sun May 10 11:18:51 PDT 2009
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
More information about the llvm-dev
mailing list