[LLVMdev] CPU feature control for JIT

Chris Lattner clattner at apple.com
Wed Oct 28 21:28:11 PDT 2009


On Oct 27, 2009, at 6:56 AM, Nicolas Capens wrote:

> Hi all,
>
> Is there a convenient way to control the instruction set extensions  
> used for JIT compilation?
>
> In particular I’m looking at selecting the SSE level, for debugging  
> and performance comparison purposes. There appear to be command-line  
> options for Clang but I haven’t figured out yet how to control them  
> directly for JIT compilation. And obviously I don’t want it to  
> generate code unsupported by the CPU either (i.e. I only want to  
> force the SSE level lower, not higher). Is this already supported,  
> or would anyone else be interested in that and/or be able to suggest  
> how best to add this feature?
>

The JIT autosenses the current CPU and forces the features it detects,  
you can hack this by (e.g.) changing  
X86Subtarget::AutoDetectSubtargetFeatures.

-Chris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091028/546e6d33/attachment.html>


More information about the llvm-dev mailing list