[llvm-commits] CVS: llvm/lib/CodeGen/TwoAddressInstructionPass.cpp

Chris Lattner lattner at cs.uiuc.edu
Sun Aug 15 15:14:43 PDT 2004



Changes in directory llvm/lib/CodeGen:

TwoAddressInstructionPass.cpp updated: 1.25 -> 1.26
---
Log message:

The insertion method returns void now


---
Diffs of the changes:  (+1 -5)

Index: llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
diff -u llvm/lib/CodeGen/TwoAddressInstructionPass.cpp:1.25 llvm/lib/CodeGen/TwoAddressInstructionPass.cpp:1.26
--- llvm/lib/CodeGen/TwoAddressInstructionPass.cpp:1.25	Thu Jul 22 10:26:23 2004
+++ llvm/lib/CodeGen/TwoAddressInstructionPass.cpp	Sun Aug 15 17:14:31 2004
@@ -45,8 +45,6 @@
 namespace {
   Statistic<> numTwoAddressInstrs("twoaddressinstruction",
                                   "Number of two-address instructions");
-  Statistic<> numInstrsAdded("twoaddressinstruction",
-                             "Number of instructions added");
 
   struct TwoAddressInstructionPass : public MachineFunctionPass {
     virtual void getAnalysisUsage(AnalysisUsage &AU) const;
@@ -124,15 +122,13 @@
 #endif
 
         const TargetRegisterClass* rc = MF.getSSARegMap()->getRegClass(regA);
-        unsigned Added = MRI.copyRegToReg(*mbbi, mi, regA, regB, rc);
-        numInstrsAdded += Added;
+        MRI.copyRegToReg(*mbbi, mi, regA, regB, rc);
 
         MachineBasicBlock::iterator prevMi = prior(mi);
         DEBUG(std::cerr << "\t\tprepend:\t"; prevMi->print(std::cerr, &TM));
 
         if (LV) {
           // update live variables for regA
-          assert(Added == 1 && "Cannot handle multi-instruction copies yet!");
           LiveVariables::VarInfo& varInfo = LV->getVarInfo(regA);
           varInfo.DefInst = prevMi;
 






More information about the llvm-commits mailing list