[LLVMdev] CPU feature control for JIT

Nicolas Capens nicolas at capens.net
Thu Oct 29 08:33:13 PDT 2009


Hi Chris,

 

That's what I'm currently doing, but I was hoping for a built-in way to do
that. I assume other JIT users would like control over this as well, so
would you be interested in a patch if I can create a clean interface for
this?

 

Suggestions for how to approach this would be very welcome. My current
proprietary hack uses global variables, which I assume are not popular. ;-)

 

Cheers,

 

Nicolas

 

From: Chris Lattner [mailto:clattner at apple.com] 
Sent: Thursday, October 29, 2009 5:28
To: Nicolas Capens
Cc: LLVM Developers Mailing List
Subject: Re: [LLVMdev] CPU feature control for JIT

 

 

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/20091029/0d616c07/attachment.html>


More information about the llvm-dev mailing list