[llvm-commits] CVS: llvm/lib/Target/Alpha/AlphaSubtarget.cpp AlphaSubtarget.h

Jim Laskey jlaskey at apple.com
Wed Oct 26 10:30:46 PDT 2005



Changes in directory llvm/lib/Target/Alpha:

AlphaSubtarget.cpp updated: 1.6 -> 1.7
AlphaSubtarget.h updated: 1.1 -> 1.2
---
Log message:

Give full control of subtarget features over to table generated code.


---
Diffs of the changes:  (+7 -6)

 AlphaSubtarget.cpp |    9 +++------
 AlphaSubtarget.h   |    4 ++++
 2 files changed, 7 insertions(+), 6 deletions(-)


Index: llvm/lib/Target/Alpha/AlphaSubtarget.cpp
diff -u llvm/lib/Target/Alpha/AlphaSubtarget.cpp:1.6 llvm/lib/Target/Alpha/AlphaSubtarget.cpp:1.7
--- llvm/lib/Target/Alpha/AlphaSubtarget.cpp:1.6	Tue Oct 25 10:15:28 2005
+++ llvm/lib/Target/Alpha/AlphaSubtarget.cpp	Wed Oct 26 12:30:34 2005
@@ -19,10 +19,7 @@
 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);
 }


Index: llvm/lib/Target/Alpha/AlphaSubtarget.h
diff -u llvm/lib/Target/Alpha/AlphaSubtarget.h:1.1 llvm/lib/Target/Alpha/AlphaSubtarget.h:1.2
--- llvm/lib/Target/Alpha/AlphaSubtarget.h:1.1	Thu Sep 29 17:54:56 2005
+++ llvm/lib/Target/Alpha/AlphaSubtarget.h	Wed Oct 26 12:30:34 2005
@@ -33,6 +33,10 @@
   /// 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; }






More information about the llvm-commits mailing list