[LLVMdev] Using the output of a user defined analysis pass in a user defined transform Pass

anna thomas annathomas87 at gmail.com
Thu Dec 1 03:28:59 PST 2011


Hi,

I have created a transform pass that uses the results of my analysis pass.

My analysis pass depends on the DominatorTree pass.

I am facing an issue when I try to use the results I get from my analysis
pass in my transform pass.

I can run the analysis pass separately using opt -load without any problem.
Both the transform and analysis pass object files are in one .so file which
I use with opt -load.

However, in my transform pass, when I use addRequired<analysis_pass> in the
getAnalysisUsage function, I get a segmentation fault when I try to run the
transform pass. I found that I do not have this error when I use an
analysis pass that does not need to be loaded (for example, loopinfo).
Also, both my transform and analysis pass are function passes.

Is it necessary that my analysis pass should be integrated into opt
(without using -load) if it has to be used by my transform pass?


Thanks,
Anna
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111201/ac3bf4b4/attachment.html>


More information about the llvm-dev mailing list