Changes in directory llvm/lib/CodeGen:

LiveVariables.cpp updated: 1.58 -> 1.59
MachineInstr.cpp updated: 1.124 -> 1.125
---
Log message:

Only call isUse/isDef on register operands


---
Diffs of the changes:  (+7 -13)

 LiveVariables.cpp |    4 ++--
 MachineInstr.cpp  |   16 +++++-----------
 2 files changed, 7 insertions(+), 13 deletions(-)


Index: llvm/lib/CodeGen/LiveVariables.cpp
diff -u llvm/lib/CodeGen/LiveVariables.cpp:1.58 
llvm/lib/CodeGen/LiveVariables.cpp:1.59
--- llvm/lib/CodeGen/LiveVariables.cpp:1.58     Sat Sep  2 19:05:09 2006
+++ llvm/lib/CodeGen/LiveVariables.cpp  Tue Sep  5 15:19:27 2006
@@ -248,7 +248,7 @@
       // Process all explicit uses...
       for (unsigned i = 0; i != NumOperandsToProcess; ++i) {
         MachineOperand &MO = MI->getOperand(i);
-        if (MO.isUse() && MO.isRegister() && MO.getReg()) {
+        if (MO.isRegister() && MO.isUse() && MO.getReg()) {
           if (MRegisterInfo::isVirtualRegister(MO.getReg())){
             HandleVirtRegUse(getVarInfo(MO.getReg()), MBB, MI);
           } else if (MRegisterInfo::isPhysicalRegister(MO.getReg()) &&
@@ -268,7 +268,7 @@
       // Process all explicit defs...
       for (unsigned i = 0; i != NumOperandsToProcess; ++i) {
         MachineOperand &MO = MI->getOperand(i);
-        if (MO.isDef() && MO.isRegister() && MO.getReg()) {
+        if (MO.isRegister() && MO.isDef() && MO.getReg()) {
           if (MRegisterInfo::isVirtualRegister(MO.getReg())) {
             VarInfo &VRInfo = getVarInfo(MO.getReg());
 


Index: llvm/lib/CodeGen/MachineInstr.cpp
diff -u llvm/lib/CodeGen/MachineInstr.cpp:1.124 
llvm/lib/CodeGen/MachineInstr.cpp:1.125
--- llvm/lib/CodeGen/MachineInstr.cpp:1.124     Thu Jun 15 02:22:16 2006
+++ llvm/lib/CodeGen/MachineInstr.cpp   Tue Sep  5 15:19:27 2006
@@ -158,7 +158,7 @@
   unsigned StartOp = 0;
 
    // Specialize printing if op#0 is definition
-  if (getNumOperands() && getOperand(0).isDef() && !getOperand(0).isUse()) {
+  if (getNumOperands() && getOperand(0).isReg() && getOperand(0).isDef()) {
     ::print(getOperand(0), OS, TM);
     OS << " = ";
     ++StartOp;   // Don't print this operand again!
@@ -176,11 +176,8 @@
     OS << " ";
     ::print(mop, OS, TM);
 
-    if (mop.isDef())
-      if (mop.isUse())
-        OS << "<def&use>";
-      else
-        OS << "<def>";
+    if (mop.isReg() && mop.isDef())
+      OS << "<def>";
   }
 
   OS << "\n";
@@ -204,11 +201,8 @@
 
   for (unsigned i = 0, N = MI.getNumOperands(); i < N; i++) {
     os << "\t" << MI.getOperand(i);
-    if (MI.getOperand(i).isDef())
-      if (MI.getOperand(i).isUse())
-        os << "<d&u>";
-      else
-        os << "<d>";
+    if (MI.getOperand(i).isReg() && MI.getOperand(i).isDef())
+      os << "<d>";
   }
 
   return os << "\n";



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to