diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-02-15 23:22:32 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-02-15 23:22:32 +0000 |
commit | ba6867d0ce3de9b7b4385f98d215edfcd36c4b32 (patch) | |
tree | b5c483b7451619c7a0dbc16a4bb5b5eaa5aa9375 /lib/Target/X86/X86Subtarget.cpp | |
parent | 9be8b4fc92e1ace819a78db512c1f945c1471be7 (diff) |
Temporary revert of 175320.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175322 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86Subtarget.cpp')
-rw-r--r-- | lib/Target/X86/X86Subtarget.cpp | 72 |
1 files changed, 33 insertions, 39 deletions
diff --git a/lib/Target/X86/X86Subtarget.cpp b/lib/Target/X86/X86Subtarget.cpp index 6391acfa80..58e0d06dfb 100644 --- a/lib/Target/X86/X86Subtarget.cpp +++ b/lib/Target/X86/X86Subtarget.cpp @@ -336,10 +336,8 @@ void X86Subtarget::resetSubtargetFeatures(const MachineFunction *MF) { !CPUAttr.hasAttribute(Attribute::None) ?CPUAttr.getValueAsString() : ""; std::string FS = !FSAttr.hasAttribute(Attribute::None) ? FSAttr.getValueAsString() : ""; - if (!FS.empty()) { - initializeEnvironment(); + if (!FS.empty()) resetSubtargetFeatures(CPU, FS); - } } void X86Subtarget::resetSubtargetFeatures(StringRef CPU, StringRef FS) { @@ -419,50 +417,46 @@ void X86Subtarget::resetSubtargetFeatures(StringRef CPU, StringRef FS) { stackAlignment = 16; } -void X86Subtarget::initializeEnvironment() { - PICStyle = PICStyles::None; - X86SSELevel = NoMMXSSE; - X863DNowLevel = NoThreeDNow; - HasCMov = false; - HasX86_64 = false; - HasPOPCNT = false; - HasSSE4A = false; - HasAES = false; - HasPCLMUL = false; - HasFMA = false; - HasFMA4 = false; - HasXOP = false; - HasMOVBE = false; - HasRDRAND = false; - HasF16C = false; - HasFSGSBase = false; - HasLZCNT = false; - HasBMI = false; - HasBMI2 = false; - HasRTM = false; - HasADX = false; - IsBTMemSlow = false; - IsUAMemFast = false; - HasVectorUAMem = false; - HasCmpxchg16b = false; - UseLeaForSP = false; - HasSlowDivide = false; - PostRAScheduler = false; - PadShortFunctions = false; - stackAlignment = 4; - // FIXME: this is a known good value for Yonah. How about others? - MaxInlineSizeThreshold = 128; -} - X86Subtarget::X86Subtarget(const std::string &TT, const std::string &CPU, const std::string &FS, unsigned StackAlignOverride, bool is64Bit) : X86GenSubtargetInfo(TT, CPU, FS) , X86ProcFamily(Others) + , PICStyle(PICStyles::None) + , X86SSELevel(NoMMXSSE) + , X863DNowLevel(NoThreeDNow) + , HasCMov(false) + , HasX86_64(false) + , HasPOPCNT(false) + , HasSSE4A(false) + , HasAES(false) + , HasPCLMUL(false) + , HasFMA(false) + , HasFMA4(false) + , HasXOP(false) + , HasMOVBE(false) + , HasRDRAND(false) + , HasF16C(false) + , HasFSGSBase(false) + , HasLZCNT(false) + , HasBMI(false) + , HasBMI2(false) + , HasRTM(false) + , HasADX(false) + , IsBTMemSlow(false) + , IsUAMemFast(false) + , HasVectorUAMem(false) + , HasCmpxchg16b(false) + , UseLeaForSP(false) + , HasSlowDivide(false) + , PostRAScheduler(false) + , PadShortFunctions(false) + , stackAlignment(4) + // FIXME: this is a known good value for Yonah. How about others? + , MaxInlineSizeThreshold(128) , TargetTriple(TT) , StackAlignOverride(StackAlignOverride) , In64BitMode(is64Bit) { - initializeEnvironment(); resetSubtargetFeatures(CPU, FS); } |