diff options
author | Craig Topper <craig.topper@gmail.com> | 2012-04-02 07:01:04 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2012-04-02 07:01:04 +0000 |
commit | 7c0b3c1fb6395475e262d66ee403645f0c67dee2 (patch) | |
tree | cb2843c4c4600b3e174f91cbda2a8b656f26bcb8 /lib/Target/PTX | |
parent | 79e22d8c45369e662ea92853f803341cdbfd77be (diff) | |
download | external_llvm-7c0b3c1fb6395475e262d66ee403645f0c67dee2.zip external_llvm-7c0b3c1fb6395475e262d66ee403645f0c67dee2.tar.gz external_llvm-7c0b3c1fb6395475e262d66ee403645f0c67dee2.tar.bz2 |
Remove getInstructionName from MCInstPrinter implementations in favor of using the instruction name table from MCInstrInfo. Reduces static data in the InstPrinter implementations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153863 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PTX')
-rw-r--r-- | lib/Target/PTX/InstPrinter/PTXInstPrinter.cpp | 4 | ||||
-rw-r--r-- | lib/Target/PTX/InstPrinter/PTXInstPrinter.h | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/Target/PTX/InstPrinter/PTXInstPrinter.cpp b/lib/Target/PTX/InstPrinter/PTXInstPrinter.cpp index 1f6fc68..3aa3b26 100644 --- a/lib/Target/PTX/InstPrinter/PTXInstPrinter.cpp +++ b/lib/Target/PTX/InstPrinter/PTXInstPrinter.cpp @@ -18,13 +18,13 @@ #include "llvm/MC/MCExpr.h" #include "llvm/MC/MCInst.h" #include "llvm/MC/MCSymbol.h" +#include "llvm/MC/MCInstrInfo.h" #include "llvm/ADT/APFloat.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; -#define GET_INSTRUCTION_NAME #include "PTXGenAsmWriter.inc" PTXInstPrinter::PTXInstPrinter(const MCAsmInfo &MAI, @@ -37,7 +37,7 @@ PTXInstPrinter::PTXInstPrinter(const MCAsmInfo &MAI, } StringRef PTXInstPrinter::getOpcodeName(unsigned Opcode) const { - return getInstructionName(Opcode); + return MII.getName(Opcode); } void PTXInstPrinter::printRegName(raw_ostream &OS, unsigned RegNo) const { diff --git a/lib/Target/PTX/InstPrinter/PTXInstPrinter.h b/lib/Target/PTX/InstPrinter/PTXInstPrinter.h index e89a8fe..b01293a 100644 --- a/lib/Target/PTX/InstPrinter/PTXInstPrinter.h +++ b/lib/Target/PTX/InstPrinter/PTXInstPrinter.h @@ -30,8 +30,6 @@ public: virtual StringRef getOpcodeName(unsigned Opcode) const; virtual void printRegName(raw_ostream &OS, unsigned RegNo) const; - static const char *getInstructionName(unsigned Opcode); - // Autogenerated by tblgen. void printInstruction(const MCInst *MI, raw_ostream &O); static const char *getRegisterName(unsigned RegNo); |