[llvm] r274292 - CodeGen: Use MachineInstr& in ExpandISelPseudos, NFC

Duncan P. N. Exon Smith via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 30 16:09:40 PDT 2016


Author: dexonsmith
Date: Thu Jun 30 18:09:39 2016
New Revision: 274292

URL: http://llvm.org/viewvc/llvm-project?rev=274292&view=rev
Log:
CodeGen: Use MachineInstr& in ExpandISelPseudos, NFC

Avoid another implicit conversion from MachineInstrBundleIterator to
MachineInstr* by using MachineInstr&.

Modified:
    llvm/trunk/lib/CodeGen/ExpandISelPseudos.cpp

Modified: llvm/trunk/lib/CodeGen/ExpandISelPseudos.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ExpandISelPseudos.cpp?rev=274292&r1=274291&r2=274292&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ExpandISelPseudos.cpp (original)
+++ llvm/trunk/lib/CodeGen/ExpandISelPseudos.cpp Thu Jun 30 18:09:39 2016
@@ -53,12 +53,12 @@ bool ExpandISelPseudos::runOnMachineFunc
     MachineBasicBlock *MBB = &*I;
     for (MachineBasicBlock::iterator MBBI = MBB->begin(), MBBE = MBB->end();
          MBBI != MBBE; ) {
-      MachineInstr *MI = MBBI++;
+      MachineInstr &MI = *MBBI++;
 
       // If MI is a pseudo, expand it.
-      if (MI->usesCustomInsertionHook()) {
+      if (MI.usesCustomInsertionHook()) {
         Changed = true;
-        MachineBasicBlock *NewMBB = TLI->EmitInstrWithCustomInserter(*MI, MBB);
+        MachineBasicBlock *NewMBB = TLI->EmitInstrWithCustomInserter(MI, MBB);
         // The expansion may involve new basic blocks.
         if (NewMBB != MBB) {
           MBB = NewMBB;




More information about the llvm-commits mailing list