[llvm-commits] CVS: llvm/lib/CodeGen/LiveVariables.cpp MachineBasicBlock.cpp MachineInstr.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed May 3 18:26:53 PDT 2006



Changes in directory llvm/lib/CodeGen:

LiveVariables.cpp updated: 1.54 -> 1.55
MachineBasicBlock.cpp updated: 1.25 -> 1.26
MachineInstr.cpp updated: 1.114 -> 1.115
---
Log message:

Remove a bunch more dead V9 specific stuff


---
Diffs of the changes:  (+9 -34)

 LiveVariables.cpp     |   14 ++++++--------
 MachineBasicBlock.cpp |    2 +-
 MachineInstr.cpp      |   27 ++-------------------------
 3 files changed, 9 insertions(+), 34 deletions(-)


Index: llvm/lib/CodeGen/LiveVariables.cpp
diff -u llvm/lib/CodeGen/LiveVariables.cpp:1.54 llvm/lib/CodeGen/LiveVariables.cpp:1.55
--- llvm/lib/CodeGen/LiveVariables.cpp:1.54	Tue Jan  3 23:40:30 2006
+++ llvm/lib/CodeGen/LiveVariables.cpp	Wed May  3 20:26:39 2006
@@ -296,14 +296,12 @@
                  "Didn't find an entry for our predecessor??");
           if (MI->getOperand(i+1).getMachineBasicBlock() == MBB) {
             MachineOperand &MO = MI->getOperand(i);
-            if (!MO.getVRegValueOrNull()) {
-              VarInfo &VRInfo = getVarInfo(MO.getReg());
-              assert(VRInfo.DefInst && "Register use before def (or no def)!");
-
-              // Only mark it alive only in the block we are representing.
-              MarkVirtRegAliveInBlock(VRInfo, MBB);
-              break;   // Found the PHI entry for this block.
-            }
+            VarInfo &VRInfo = getVarInfo(MO.getReg());
+            assert(VRInfo.DefInst && "Register use before def (or no def)!");
+
+            // Only mark it alive only in the block we are representing.
+            MarkVirtRegAliveInBlock(VRInfo, MBB);
+            break;   // Found the PHI entry for this block.
           }
         }
       }


Index: llvm/lib/CodeGen/MachineBasicBlock.cpp
diff -u llvm/lib/CodeGen/MachineBasicBlock.cpp:1.25 llvm/lib/CodeGen/MachineBasicBlock.cpp:1.26
--- llvm/lib/CodeGen/MachineBasicBlock.cpp:1.25	Thu Apr 21 17:33:33 2005
+++ llvm/lib/CodeGen/MachineBasicBlock.cpp	Wed May  3 20:26:39 2006
@@ -47,7 +47,7 @@
 
 
 MachineInstr* ilist_traits<MachineInstr>::createSentinel() {
-  MachineInstr* dummy = new MachineInstr(0, 0);
+  MachineInstr* dummy = new MachineInstr(0, 0, true, true);
   LeakDetector::removeGarbageObject(dummy);
   return dummy;
 }


Index: llvm/lib/CodeGen/MachineInstr.cpp
diff -u llvm/lib/CodeGen/MachineInstr.cpp:1.114 llvm/lib/CodeGen/MachineInstr.cpp:1.115
--- llvm/lib/CodeGen/MachineInstr.cpp:1.114	Wed May  3 20:15:02 2006
+++ llvm/lib/CodeGen/MachineInstr.cpp	Wed May  3 20:26:39 2006
@@ -36,15 +36,6 @@
   extern const TargetInstrDescriptor *TargetInstrDescriptors;
 }
 
-// Constructor for instructions with variable #operands
-MachineInstr::MachineInstr(short opcode, unsigned numOperands)
-  : Opcode(opcode),
-    operands(numOperands, MachineOperand()),
-    parent(0) {
-  // Make sure that we get added to a machine basicblock
-  LeakDetector::addGarbageObject(this);
-}
-
 /// MachineInstr ctor - This constructor only does a _reserve_ of the operands,
 /// not a resize for them.  It is expected that if you use this that you call
 /// add* methods below to fill up the operands, instead of the Set methods.
@@ -178,14 +169,7 @@
 
   switch (MO.getType()) {
   case MachineOperand::MO_VirtualRegister:
-    if (MO.getVRegValue()) {
-      OS << "%reg";
-      OutputValue(OS, MO.getVRegValue());
-      if (MO.hasAllocatedReg())
-        OS << "==";
-    }
-    if (MO.hasAllocatedReg())
-      OutputReg(OS, MO.getReg(), MRI);
+    OutputReg(OS, MO.getReg(), MRI);
     break;
   case MachineOperand::MO_SignExtendedImmed:
     OS << (long)MO.getImmedValue();
@@ -285,14 +269,7 @@
 std::ostream &llvm::operator<<(std::ostream &OS, const MachineOperand &MO) {
   switch (MO.getType()) {
   case MachineOperand::MO_VirtualRegister:
-    if (MO.hasAllocatedReg())
-      OutputReg(OS, MO.getReg());
-
-    if (MO.getVRegValue()) {
-      if (MO.hasAllocatedReg()) OS << "==";
-      OS << "%vreg";
-      OutputValue(OS, MO.getVRegValue());
-    }
+    OutputReg(OS, MO.getReg());
     break;
   case MachineOperand::MO_SignExtendedImmed:
     OS << (long)MO.getImmedValue();






More information about the llvm-commits mailing list