Jobin, Gaƫl
2015-Mar-19 08:55 UTC
[LLVMdev] LLVM pass adding function call specific to Linux, middle-end or backend?
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>