[X86] Remove WaitInsert::TTI member. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 9 Sep 2020 16:48:22 +0000 (17:48 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 10 Sep 2020 10:45:08 +0000 (11:45 +0100)
This is only ever set/used inside WaitInsert::runOnMachineFunction so don't bother storing it in the class.

llvm/lib/Target/X86/X86InsertWait.cpp

index a82d98d..56d2709 100644 (file)
@@ -27,7 +27,6 @@
 #include "llvm/CodeGen/MachineInstr.h"
 #include "llvm/CodeGen/MachineInstrBuilder.h"
 #include "llvm/CodeGen/MachineOperand.h"
-#include "llvm/CodeGen/TargetInstrInfo.h"
 #include "llvm/IR/DebugLoc.h"
 #include "llvm/Support/Debug.h"
 
@@ -48,9 +47,6 @@ public:
   StringRef getPassName() const override {
     return "X86 insert wait instruction";
   }
-
-private:
-  const TargetInstrInfo *TII; // Machine instruction info.
 };
 
 } // namespace
@@ -119,7 +115,7 @@ bool WaitInsert::runOnMachineFunction(MachineFunction &MF) {
     return false;
 
   const X86Subtarget &ST = MF.getSubtarget<X86Subtarget>();
-  TII = ST.getInstrInfo();
+  const X86InstrInfo *TII = ST.getInstrInfo();
   bool Changed = false;
 
   for (MachineBasicBlock &MBB : MF) {