<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi everyone,</p>
<p>I have already developped some optimizer pass in the middle-end playing with the LLVM IR.</p>
<p>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?</p>
<p> </p>
<p>Thank you for your help.</p>
<p>Gael</p>
<div> </div>
</body></html>