[LLVMdev] Changing target features from C++

Nicolas Capens nicolas at capens.net
Sun Jul 20 02:59:20 PDT 2008


Hi Chris,

 

I see. While hacking AutoDetectSubtargetFeatures() works for me for now,
would it be useful to define an interface for X86Subtarget to change the
features in a cleaner way? Would methods like disableSSEn()/enableSSEn()
work or do you have another suggestion? I certainly want to avoid a
situation where one module uses other settings than another module.

 

Thanks,

 

Nicolas

 

  _____  

From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On
Behalf Of Chris Lattner
Sent: Friday, 18 July, 2008 20:06
To: LLVM Developers Mailing List
Subject: Re: [LLVMdev] Changing target features from C++

 

 

On Jul 18, 2008, at 8:42 AM, Nicolas Capens wrote:





Hi all,

 

How do I properly/conveniently change ISA features of the code to be
generated? For instance I have a Core 2 Duo with SSSE3 but I'd also like to
test whether everything would JIT compile correctly on something with just
SSE2 (a Pentium 4) or even older. In other words, how do I prevent LLVM from
using certain target features?

 

 

The JIT defaults to using whatever it can.  You can hack
X86Subtarget::AutoDetectSubtargetFeatures() to disable specific features.

 

-Chris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080720/9f1542d0/attachment.html>


More information about the llvm-dev mailing list