Delete MCInstPrinter::AvailableFeatures.
authorAkira Hatanaka <ahatanaka@apple.com>
Sat, 28 Mar 2015 21:07:24 +0000 (21:07 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Sat, 28 Mar 2015 21:07:24 +0000 (21:07 +0000)
All the ports have been fixed to read the feature bits from the subtarget passed
to the print methods. Also, delete the call to setAvailableFeatures in the
constructor of NVPTX's instprinter as the instprinter wasn't using the feature
bits anywhere.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233486 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MCInstPrinter.h
lib/Target/NVPTX/InstPrinter/NVPTXInstPrinter.cpp

index 3ddbcfd5f78958e384a6117216b2a9630fe2d6f3..4181d001add97287daeb93c0d76360fdb756172d 100644 (file)
@@ -41,9 +41,6 @@ protected:
   const MCInstrInfo &MII;
   const MCRegisterInfo &MRI;
 
-  /// The current set of available features.
-  uint64_t AvailableFeatures;
-
   /// True if we are printing marked up assembly.
   bool UseMarkup;
 
@@ -59,7 +56,7 @@ public:
   MCInstPrinter(const MCAsmInfo &mai, const MCInstrInfo &mii,
                 const MCRegisterInfo &mri)
     : CommentStream(nullptr), MAI(mai), MII(mii), MRI(mri),
-      AvailableFeatures(0), UseMarkup(0), PrintImmHex(0),
+      UseMarkup(0), PrintImmHex(0),
       PrintHexStyle(HexStyle::C) {}
 
   virtual ~MCInstPrinter();
@@ -79,9 +76,6 @@ public:
   /// printRegName - Print the assembler register name.
   virtual void printRegName(raw_ostream &OS, unsigned RegNo) const;
 
-  uint64_t getAvailableFeatures() const { return AvailableFeatures; }
-  void setAvailableFeatures(uint64_t Value) { AvailableFeatures = Value; }
-
   bool getUseMarkup() const { return UseMarkup; }
   void setUseMarkup(bool Value) { UseMarkup = Value; }
 
index 2546c4d8b72357fba82e83de97149b7aec947e9a..891b9985db19303e2e16d89814be96d9a7c4d85f 100644 (file)
@@ -32,9 +32,7 @@ using namespace llvm;
 NVPTXInstPrinter::NVPTXInstPrinter(const MCAsmInfo &MAI, const MCInstrInfo &MII,
                                    const MCRegisterInfo &MRI,
                                    const MCSubtargetInfo &STI)
-  : MCInstPrinter(MAI, MII, MRI) {
-  setAvailableFeatures(STI.getFeatureBits());
-}
+  : MCInstPrinter(MAI, MII, MRI) {}
 
 void NVPTXInstPrinter::printRegName(raw_ostream &OS, unsigned RegNo) const {
   // Decode the virtual register