[LLVMdev] Changing target features from C++

Nicolas Capens nicolas at capens.net
Mon Jul 21 12:07:32 PDT 2008


Hi Chris,

 

I need it to test correct code generation on a wide variety of CPUs. I'm not
entirely confident that if it runs fine on my Core 2 it will run fine on a
Pentium 4 or an Athlon 64, etc. (especially since I use lots of vector
operations). And since I don't have ten different systems to test on I need
to make sure LLVM can be forced not to use certain CPU features.

 

Cheers,

 

Nicolas

 

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

 

 

On Jul 20, 2008, at 2:59 AM, Nicolas Capens wrote:





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.

 

Why would this be useful for other users?  It seems best to always take
advantage of features the cpu has if possible, and the JIT has perfect
knowledge of what the host cpu has.

 

-Chris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080721/35ad3414/attachment.html>


More information about the llvm-dev mailing list