[LLVMdev] Call Graph Analysis
kapilanand2 at gmail.com
Thu Aug 21 14:20:27 PDT 2008
I have made my optimization as an extension of ModulePass as suggested in
last mail. I included "addRequired<CallGraph>" in getAnalysisUsage function.
The application compiles fine but while linking, I get following errors:
"undefined reference to llvm::CallGraphLinkVar"
"undefined reference to llvm::CallGraph::ID
The above error is at point where I refer to individual instruction. I
followed the conventions used in GlobalModRefPass, which is also an
extension of ModulePass. Is there any other convention which needs to be
On Wed, Aug 20, 2008 at 1:59 PM, Bill Wendling <isanbard at gmail.com> wrote:
> On Wed, Aug 20, 2008 at 9:47 AM, kapil anand <kapilanand2 at gmail.com>
> > Hi,
> > I have been working on implementing new analysis for a LLVM module. For
> > that, I need that Call Graph of the module. Inside the CallGraph file,
> > constructor has been declared "protected" hence I can't define its
> > and thus use the CallGraph for further analysis.
> > So, what are the ways of building and using Call Graph of a module. Do I
> > need to make my new analysis as another PASS?
> Yes, you should make it a pass, and then say that that pass requires
> call graph information like this:
> The pass manager's responsible for providing that analysis information
> for you. See how it's used in other passes for examples.
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev