diff options
Diffstat (limited to 'llvm/lib/Target/Alpha')
| -rw-r--r-- | llvm/lib/Target/Alpha/AlphaSubtarget.cpp | 9 | ||||
| -rw-r--r-- | llvm/lib/Target/Alpha/AlphaSubtarget.h | 4 |
2 files changed, 7 insertions, 6 deletions
diff --git a/llvm/lib/Target/Alpha/AlphaSubtarget.cpp b/llvm/lib/Target/Alpha/AlphaSubtarget.cpp index cc3a6b11f93..22f0c698235 100644 --- a/llvm/lib/Target/Alpha/AlphaSubtarget.cpp +++ b/llvm/lib/Target/Alpha/AlphaSubtarget.cpp @@ -19,10 +19,7 @@ using namespace llvm; AlphaSubtarget::AlphaSubtarget(const Module &M, const std::string &FS) : HasF2I(false), HasCT(false) { std::string CPU = "generic"; - SubtargetFeatures Features(FS); - Features.setCPUIfNone(CPU); - uint32_t Bits =Features.getBits(SubTypeKV, SubTypeKVSize, - FeatureKV, FeatureKVSize); - HasF2I = (Bits & FeatureFIX) != 0; - HasCT = (Bits & FeatureCIX) != 0; + + // Parse features string. + ParseSubtargetFeatures(FS, CPU); } diff --git a/llvm/lib/Target/Alpha/AlphaSubtarget.h b/llvm/lib/Target/Alpha/AlphaSubtarget.h index 8eadec00d05..d5847f3bf35 100644 --- a/llvm/lib/Target/Alpha/AlphaSubtarget.h +++ b/llvm/lib/Target/Alpha/AlphaSubtarget.h @@ -33,6 +33,10 @@ public: /// of the specified module. /// AlphaSubtarget(const Module &M, const std::string &FS); + + /// ParseSubtargetFeatures - Parses features string setting specified + /// subtarget options. Definition of function is usto generated by tblgen. + void ParseSubtargetFeatures(const std::string &FS, const std::string &CPU); bool hasF2I() const { return HasF2I; } bool hasCT() const { return HasCT; } |

