[llvm] r239678 - remove unnecessary casts; NFCI

Sanjay Patel spatel at rotateright.com
Sat Jun 13 08:06:33 PDT 2015


Author: spatel
Date: Sat Jun 13 10:06:33 2015
New Revision: 239678

URL: http://llvm.org/viewvc/llvm-project?rev=239678&view=rev
Log:
remove unnecessary casts; NFCI

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

Modified: llvm/trunk/lib/CodeGen/MachineCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineCombiner.cpp?rev=239678&r1=239677&r2=239678&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineCombiner.cpp Sat Jun 13 10:06:33 2015
@@ -373,8 +373,7 @@ bool MachineCombiner::combineInstruction
                                       InstrIdxForVirtReg) &&
              preservesResourceLen(MBB, BlockTrace, InsInstrs, DelInstrs))) {
           for (auto *InstrPtr : InsInstrs)
-            MBB->insert((MachineBasicBlock::iterator) & MI,
-                        (MachineInstr *)InstrPtr);
+            MBB->insert((MachineBasicBlock::iterator) &MI, InstrPtr);
           for (auto *InstrPtr : DelInstrs)
             InstrPtr->eraseFromParentAndMarkDBGValuesForRemoval();
 
@@ -390,7 +389,7 @@ bool MachineCombiner::combineInstruction
           // use for them.
           for (auto *InstrPtr : InsInstrs) {
             MachineFunction *MF = MBB->getParent();
-            MF->DeleteMachineInstr((MachineInstr *)InstrPtr);
+            MF->DeleteMachineInstr(InstrPtr);
           }
         }
         InstrIdxForVirtReg.clear();





More information about the llvm-commits mailing list