diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-02-15 22:31:27 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-02-15 22:31:27 +0000 |
commit | aef9c37c65ac109deb87cc9128a7117f41a6f61f (patch) | |
tree | 3e3feed8a439a90ecd1520c2565047bb033ea959 /llvm/lib/Target/X86/X86Subtarget.h | |
parent | 77d56be3f02e1f96d26612aeae2c1088098b8039 (diff) | |
download | bcm5719-llvm-aef9c37c65ac109deb87cc9128a7117f41a6f61f.tar.gz bcm5719-llvm-aef9c37c65ac109deb87cc9128a7117f41a6f61f.zip |
Use the 'target-features' and 'target-cpu' attributes to reset the subtarget features.
If two functions require different features (e.g., `-mno-sse' vs. `-msse') then
we want to honor that, especially during LTO. We can do that by resetting the
subtarget's features depending upon the 'target-feature' attribute.
llvm-svn: 175314
Diffstat (limited to 'llvm/lib/Target/X86/X86Subtarget.h')
-rw-r--r-- | llvm/lib/Target/X86/X86Subtarget.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86Subtarget.h b/llvm/lib/Target/X86/X86Subtarget.h index 1466041712e..d1c706725de 100644 --- a/llvm/lib/Target/X86/X86Subtarget.h +++ b/llvm/lib/Target/X86/X86Subtarget.h @@ -168,11 +168,13 @@ protected: InstrItineraryData InstrItins; private: + /// StackAlignOverride - Override the stack alignment. + unsigned StackAlignOverride; + /// In64BitMode - True if compiling for 64-bit, false for 32-bit. bool In64BitMode; public: - /// This constructor initializes the data members to match that /// of the specified triple. /// @@ -197,6 +199,10 @@ public: /// instruction. void AutoDetectSubtargetFeatures(); + /// \brief Reset the features for the X86 target. + virtual void resetSubtargetFeatures(const MachineFunction *MF); + void resetSubtargetFeatures(StringRef CPU, StringRef FS); + /// Is this x86_64? (disregarding specific ABI / programming model) bool is64Bit() const { return In64BitMode; |