[LLVMdev] Call an analysis pass inside a tool pass

John Criswell criswell at illinois.edu
Mon Jun 23 22:09:09 PDT 2014


Dear Simone,

My guess is that the address sanitizer pass is running before your 
pass.  You should use the -Xclang -debug-pass=Structure argument to see 
the order in which passes are run.

Regards,

John Criswell

On 6/23/14, 6:52 PM, Simone Atzeni wrote:
> 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 
> <mailto: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
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140624/50f5bc65/attachment.html>


More information about the llvm-dev mailing list