diff options
author | Eugene Zelenko <eugene.zelenko@gmail.com> | 2017-09-28 22:27:31 +0000 |
---|---|---|
committer | Eugene Zelenko <eugene.zelenko@gmail.com> | 2017-09-28 22:27:31 +0000 |
commit | 3b87336a0c4e7974c007d489926e5e1bcf722a75 (patch) | |
tree | 07bfa7f2b37ba7efcca2d7b7fadfe097dda1a9d5 /llvm/lib/Target/Hexagon/HexagonVectorPrint.cpp | |
parent | 4664d7731660155d104a96fd44d9bef9d19c697d (diff) | |
download | bcm5719-llvm-3b87336a0c4e7974c007d489926e5e1bcf722a75.tar.gz bcm5719-llvm-3b87336a0c4e7974c007d489926e5e1bcf722a75.zip |
[Hexagon] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 314467
Diffstat (limited to 'llvm/lib/Target/Hexagon/HexagonVectorPrint.cpp')
-rw-r--r-- | llvm/lib/Target/Hexagon/HexagonVectorPrint.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonVectorPrint.cpp b/llvm/lib/Target/Hexagon/HexagonVectorPrint.cpp index 085d4645df0..45931a930dc 100644 --- a/llvm/lib/Target/Hexagon/HexagonVectorPrint.cpp +++ b/llvm/lib/Target/Hexagon/HexagonVectorPrint.cpp @@ -1,4 +1,4 @@ -//===-- HexagonVectorPrint.cpp - Generate vector printing instructions -===// +//===- HexagonVectorPrint.cpp - Generate vector printing instructions -----===// // // The LLVM Compiler Infrastructure // @@ -13,8 +13,6 @@ // //===----------------------------------------------------------------------===// -#define DEBUG_TYPE "hexagon-vector-print" - #include "HexagonInstrInfo.h" #include "HexagonSubtarget.h" #include "llvm/ADT/StringRef.h" @@ -31,34 +29,36 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/Target/TargetOpcodes.h" #include <string> #include <vector> using namespace llvm; +#define DEBUG_TYPE "hexagon-vector-print" + static cl::opt<bool> TraceHexVectorStoresOnly("trace-hex-vector-stores-only", cl::Hidden, cl::ZeroOrMore, cl::init(false), cl::desc("Enables tracing of vector stores")); namespace llvm { - FunctionPass *createHexagonVectorPrint(); - void initializeHexagonVectorPrintPass(PassRegistry&); +FunctionPass *createHexagonVectorPrint(); +void initializeHexagonVectorPrintPass(PassRegistry&); } // end namespace llvm namespace { class HexagonVectorPrint : public MachineFunctionPass { - const HexagonSubtarget *QST; - const HexagonInstrInfo *QII; - const HexagonRegisterInfo *QRI; + const HexagonSubtarget *QST = nullptr; + const HexagonInstrInfo *QII = nullptr; + const HexagonRegisterInfo *QRI = nullptr; public: static char ID; - HexagonVectorPrint() - : MachineFunctionPass(ID), QST(nullptr), QII(nullptr), QRI(nullptr) { + HexagonVectorPrint() : MachineFunctionPass(ID) { initializeHexagonVectorPrintPass(*PassRegistry::getPassRegistry()); } @@ -67,10 +67,10 @@ public: bool runOnMachineFunction(MachineFunction &Fn) override; }; -char HexagonVectorPrint::ID = 0; - } // end anonymous namespace +char HexagonVectorPrint::ID = 0; + static bool isVecReg(unsigned Reg) { return (Reg >= Hexagon::V0 && Reg <= Hexagon::V31) || (Reg >= Hexagon::W0 && Reg <= Hexagon::W15) @@ -97,7 +97,6 @@ static void addAsmInstr(MachineBasicBlock *MBB, unsigned Reg, MachineBasicBlock::instr_iterator I, const DebugLoc &DL, const HexagonInstrInfo *QII, MachineFunction &Fn) { - std::string VDescStr = ".long 0x1dffe0" + getStringReg(Reg); const char *cstr = Fn.createExternalSymbolName(VDescStr); unsigned ExtraInfo = InlineAsm::Extra_HasSideEffects; |