[llvm-commits] [llvm] r140267 - in /llvm/trunk/lib/Target: ARM/InstPrinter/ARMInstPrinter.cpp MBlaze/InstPrinter/MBlazeInstPrinter.cpp MSP430/InstPrinter/MSP430InstPrinter.cpp Mips/InstPrinter/MipsInstPrinter.cpp PowerPC/InstPrinter/PPCInstPrinter.cpp

Owen Anderson resistor at mac.com
Wed Sep 21 10:58:45 PDT 2011


Author: resistor
Date: Wed Sep 21 12:58:45 2011
New Revision: 140267

URL: http://llvm.org/viewvc/llvm-project?rev=140267&view=rev
Log:
These do not need to be conditional on the presence of CommentStream, as they have a fallback path now.

Modified:
    llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
    llvm/trunk/lib/Target/MBlaze/InstPrinter/MBlazeInstPrinter.cpp
    llvm/trunk/lib/Target/MSP430/InstPrinter/MSP430InstPrinter.cpp
    llvm/trunk/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp
    llvm/trunk/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp

Modified: llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp?rev=140267&r1=140266&r2=140267&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp Wed Sep 21 12:58:45 2011
@@ -72,7 +72,7 @@
 
     O << ", " << getRegisterName(MO2.getReg());
     assert(ARM_AM::getSORegOffset(MO3.getImm()) == 0);
-    if (CommentStream) printAnnotation(O, Annot);
+    printAnnotation(O, Annot);
     return;
   }
 
@@ -90,12 +90,12 @@
       << ", " << getRegisterName(MO1.getReg());
 
     if (ARM_AM::getSORegShOp(MO2.getImm()) == ARM_AM::rrx) {
-      if (CommentStream) printAnnotation(O, Annot);
+      printAnnotation(O, Annot);
       return;
     }
 
     O << ", #" << translateShiftImm(ARM_AM::getSORegOffset(MO2.getImm()));
-    if (CommentStream) printAnnotation(O, Annot);
+    printAnnotation(O, Annot);
     return;
   }
 
@@ -109,7 +109,7 @@
       O << ".w";
     O << '\t';
     printRegisterList(MI, 4, O);
-    if (CommentStream) printAnnotation(O, Annot);
+    printAnnotation(O, Annot);
     return;
   }
   if (Opcode == ARM::STR_PRE_IMM && MI->getOperand(2).getReg() == ARM::SP &&
@@ -117,7 +117,7 @@
     O << '\t' << "push";
     printPredicateOperand(MI, 4, O);
     O << "\t{" << getRegisterName(MI->getOperand(1).getReg()) << "}";
-    if (CommentStream) printAnnotation(O, Annot);
+    printAnnotation(O, Annot);
     return;
   }
 
@@ -130,7 +130,7 @@
       O << ".w";
     O << '\t';
     printRegisterList(MI, 4, O);
-    if (CommentStream) printAnnotation(O, Annot);
+    printAnnotation(O, Annot);
     return;
   }
   if (Opcode == ARM::LDR_POST_IMM && MI->getOperand(2).getReg() == ARM::SP &&
@@ -138,7 +138,7 @@
     O << '\t' << "pop";
     printPredicateOperand(MI, 5, O);
     O << "\t{" << getRegisterName(MI->getOperand(0).getReg()) << "}";
-    if (CommentStream) printAnnotation(O, Annot);
+    printAnnotation(O, Annot);
     return;
   }
 
@@ -150,7 +150,7 @@
     printPredicateOperand(MI, 2, O);
     O << '\t';
     printRegisterList(MI, 4, O);
-    if (CommentStream) printAnnotation(O, Annot);
+    printAnnotation(O, Annot);
     return;
   }
 
@@ -161,7 +161,7 @@
     printPredicateOperand(MI, 2, O);
     O << '\t';
     printRegisterList(MI, 4, O);
-    if (CommentStream) printAnnotation(O, Annot);
+    printAnnotation(O, Annot);
     return;
   }
 
@@ -180,7 +180,7 @@
     if (Writeback) O << "!";
     O << ", ";
     printRegisterList(MI, 3, O);
-    if (CommentStream) printAnnotation(O, Annot);
+    printAnnotation(O, Annot);
     return;
   }
 
@@ -189,12 +189,12 @@
       MI->getOperand(1).getReg() == ARM::R8) {
     O << "\tnop";
     printPredicateOperand(MI, 2, O);
-    if (CommentStream) printAnnotation(O, Annot);
+    printAnnotation(O, Annot);
     return;
   }
 
   printInstruction(MI, O);
-  if (CommentStream) printAnnotation(O, Annot);
+  printAnnotation(O, Annot);
 }
 
 void ARMInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,

Modified: llvm/trunk/lib/Target/MBlaze/InstPrinter/MBlazeInstPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MBlaze/InstPrinter/MBlazeInstPrinter.cpp?rev=140267&r1=140266&r2=140267&view=diff
==============================================================================
--- llvm/trunk/lib/Target/MBlaze/InstPrinter/MBlazeInstPrinter.cpp (original)
+++ llvm/trunk/lib/Target/MBlaze/InstPrinter/MBlazeInstPrinter.cpp Wed Sep 21 12:58:45 2011
@@ -28,7 +28,7 @@
 void MBlazeInstPrinter::printInst(const MCInst *MI, raw_ostream &O,
                                   StringRef Annot) {
   printInstruction(MI, O);
-  if (CommentStream) printAnnotation(O, Annot);
+  printAnnotation(O, Annot);
 }
 
 void MBlazeInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,

Modified: llvm/trunk/lib/Target/MSP430/InstPrinter/MSP430InstPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/InstPrinter/MSP430InstPrinter.cpp?rev=140267&r1=140266&r2=140267&view=diff
==============================================================================
--- llvm/trunk/lib/Target/MSP430/InstPrinter/MSP430InstPrinter.cpp (original)
+++ llvm/trunk/lib/Target/MSP430/InstPrinter/MSP430InstPrinter.cpp Wed Sep 21 12:58:45 2011
@@ -28,7 +28,7 @@
 void MSP430InstPrinter::printInst(const MCInst *MI, raw_ostream &O,
                                   StringRef Annot) {
   printInstruction(MI, O);
-  if (CommentStream) printAnnotation(O, Annot);
+  printAnnotation(O, Annot);
 }
 
 void MSP430InstPrinter::printPCRelImmOperand(const MCInst *MI, unsigned OpNo,

Modified: llvm/trunk/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp?rev=140267&r1=140266&r2=140267&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp Wed Sep 21 12:58:45 2011
@@ -72,7 +72,7 @@
 void MipsInstPrinter::printInst(const MCInst *MI, raw_ostream &O,
                                 StringRef Annot) {
   printInstruction(MI, O);
-  if (CommentStream) printAnnotation(O, Annot);
+  printAnnotation(O, Annot);
 }
 
 void MipsInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,

Modified: llvm/trunk/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp?rev=140267&r1=140266&r2=140267&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp Wed Sep 21 12:58:45 2011
@@ -52,7 +52,7 @@
       printOperand(MI, 1, O);
       O << ", " << (unsigned int)SH;
 
-      if (CommentStream) printAnnotation(O, Annot);
+      printAnnotation(O, Annot);
       return;
     }
   }
@@ -63,7 +63,7 @@
     printOperand(MI, 0, O);
     O << ", ";
     printOperand(MI, 1, O);
-    if (CommentStream) printAnnotation(O, Annot);
+    printAnnotation(O, Annot);
     return;
   }
   
@@ -77,13 +77,13 @@
       O << ", ";
       printOperand(MI, 1, O);
       O << ", " << (unsigned int)SH;
-      if (CommentStream) printAnnotation(O, Annot);
+      printAnnotation(O, Annot);
       return;
     }
   }
   
   printInstruction(MI, O);
-  if (CommentStream) printAnnotation(O, Annot);
+  printAnnotation(O, Annot);
 }
 
 





More information about the llvm-commits mailing list