[LLVMdev] Call an analysis pass inside a tool pass

Simone Atzeni simone.at at gmail.com
Mon Jun 23 16:52:09 PDT 2014


Maybe the question is wrong.

I have my own pass (a RegionPass), what I want to do is to add some metadata in the IR and then have this metadata available for another pass (a Function Pass already existing in Transform/Instrumentation, called AddressSanitizer) and use these metadata inside it.

So I was thinking that maybe I have to call first my pass and then the second pass.
However, the second pass is inside the library libLLVMInstrumentation.a and to call it there is a clang option -fsanitize=address.

I tried these command:

clang -fsanitize=address -g -O0 -mllvm -polly -S -emit-llvm -Xclang -load -Xclang $HOME/bigdata/compilers/llvm35/tools/polly/Debug+Asserts/lib/LLVMPolly.so -I$HOME/bigdata/runtime/libomp_oss/exports/common.deb/include -L$HOME/bigdata/runtime/libomp_oss/exports/lin_32e.deb/lib -liomp5 myprogram.c

but the AddressSanitizer pass does not see any new metadata, do you have any idea where could be the problem?

Thanks.
Best,
Simone

On Jun 23, 2014, at 15:12, Simone Atzeni <simone.at at gmail.com> wrote:

> Hi,
> 
> as in the subject, is it possible to call on of the analysis pass present in the LLVM (lib/ folder) within a tool pass (tools/ folder)?
> 
> Thanks.
> Best,
> Simone

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140623/9a3a2d95/attachment.html>


More information about the llvm-dev mailing list