[LLVMdev] LLVM pass adding function call specific to Linux, middle-end or backend?

Jobin, Gaƫl gael.jobin at switzerlandmail.ch
Thu Mar 19 01:55:18 PDT 2015


 

Hi everyone, 

I have already developped some optimizer pass in the middle-end playing
with the LLVM IR. 

Now, I would like to write a pass that are going to add some functions
calls that exist only on Linux system (both x86 and x64). I was
wondering about the right way to do it. Does LLVM offer any way to
obtain the current architecture in the middle-end (analysis pass maybe)?
If so, should I write this pass in the middle-end using the flexibility
of LLVM IR to add function call and some if/else branch to avoid
transformation on unsupported OS? Or should I write my pass somewhere
(where?) in the backend's specific part for Linux x86/x64 architecture? 

Thank you for your help. 

Gael 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150319/904ac13b/attachment.html>


More information about the llvm-dev mailing list