[llvm-commits] [llvm] r46667 - in /llvm/trunk: lib/CodeGen/AsmPrinter.cpp lib/Target/ARM/ARMAsmPrinter.cpp lib/Target/Alpha/AlphaAsmPrinter.cpp lib/Target/CellSPU/SPUAsmPrinter.cpp lib/Target/IA64/IA64AsmPrinter.cpp lib/Target/Mips/MipsAsmPrinter.cpp lib/Target/PowerPC/PPCAsmPrinter.cpp lib/Target/Sparc/SparcAsmPrinter.cpp lib/Target/X86/X86ATTAsmPrinter.cpp lib/Target/X86/X86IntelAsmPrinter.cpp utils/TableGen/AsmWriterEmitter.cpp

Evan Cheng evan.cheng at apple.com
Sat Feb 2 00:39:46 PST 2008


Author: evancheng
Date: Sat Feb  2 02:39:46 2008
New Revision: 46667

URL: http://llvm.org/viewvc/llvm-project?rev=46667&view=rev
Log:
Get rid of the annoying blank lines before labels.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter.cpp
    llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp
    llvm/trunk/lib/Target/Alpha/AlphaAsmPrinter.cpp
    llvm/trunk/lib/Target/CellSPU/SPUAsmPrinter.cpp
    llvm/trunk/lib/Target/IA64/IA64AsmPrinter.cpp
    llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp
    llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp
    llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp
    llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp
    llvm/trunk/lib/Target/X86/X86IntelAsmPrinter.cpp
    llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter.cpp?rev=46667&r1=46666&r2=46667&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter.cpp Sat Feb  2 02:39:46 2008
@@ -1281,18 +1281,18 @@
 /// printLabel - This method prints a local label used by debug and
 /// exception handling tables.
 void AsmPrinter::printLabel(const MachineInstr *MI) const {
-  O << "\n" << TAI->getPrivateGlobalPrefix()
+  O << TAI->getPrivateGlobalPrefix()
     << "label" << MI->getOperand(0).getImm() << ":\n";
 }
 
 void AsmPrinter::printLabel(unsigned Id) const {
-  O << "\n" << TAI->getPrivateGlobalPrefix() << "label" << Id << ":\n";
+  O << TAI->getPrivateGlobalPrefix() << "label" << Id << ":\n";
 }
 
 /// printDeclare - This method prints a local variable declaration used by
 /// debug tables.
 void AsmPrinter::printDeclare(const MachineInstr *MI) const {
-  O << "\n";
+  // Do nothing.
 }
 
 /// PrintAsmOperand - Print the specified operand of MI, an INLINEASM

Modified: llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp?rev=46667&r1=46666&r2=46667&view=diff

==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp Sat Feb  2 02:39:46 2008
@@ -786,7 +786,6 @@
     case ARM::tPICADD:
       break;
     default:
-      O << "\t";
       break;
     }
   }}

Modified: llvm/trunk/lib/Target/Alpha/AlphaAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Alpha/AlphaAsmPrinter.cpp?rev=46667&r1=46666&r2=46667&view=diff

==============================================================================
--- llvm/trunk/lib/Target/Alpha/AlphaAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Alpha/AlphaAsmPrinter.cpp Sat Feb  2 02:39:46 2008
@@ -177,7 +177,6 @@
          II != E; ++II) {
       // Print the assembly for the instruction.
       ++EmittedInsts;
-      O << "\t";
       if (!printInstruction(II)) {
         assert(0 && "Unhandled instruction in asm writer!");
         abort();

Modified: llvm/trunk/lib/Target/CellSPU/SPUAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUAsmPrinter.cpp?rev=46667&r1=46666&r2=46667&view=diff

==============================================================================
--- llvm/trunk/lib/Target/CellSPU/SPUAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/CellSPU/SPUAsmPrinter.cpp Sat Feb  2 02:39:46 2008
@@ -465,7 +465,6 @@
     for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
          II != E; ++II) {
       // Print the assembly for the instruction.
-      O << "\t";
       printMachineInstruction(II);
     }
   }

Modified: llvm/trunk/lib/Target/IA64/IA64AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/IA64/IA64AsmPrinter.cpp?rev=46667&r1=46666&r2=46667&view=diff

==============================================================================
--- llvm/trunk/lib/Target/IA64/IA64AsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/IA64/IA64AsmPrinter.cpp Sat Feb  2 02:39:46 2008
@@ -154,7 +154,6 @@
     for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
          II != E; ++II) {
       // Print the assembly for the instruction.
-      O << "\t";
       printMachineInstruction(II);
     }
   }

Modified: llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp?rev=46667&r1=46666&r2=46667&view=diff

==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsAsmPrinter.cpp Sat Feb  2 02:39:46 2008
@@ -304,7 +304,6 @@
     for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
          II != E; ++II) {
       // Print the assembly for the instruction.
-      O << "\t";
       printInstruction(II);
       ++EmittedInsts;
     }

Modified: llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp?rev=46667&r1=46666&r2=46667&view=diff

==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCAsmPrinter.cpp Sat Feb  2 02:39:46 2008
@@ -610,7 +610,6 @@
     for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
          II != E; ++II) {
       // Print the assembly for the instruction.
-      O << "\t";
       printMachineInstruction(II);
     }
   }
@@ -833,7 +832,6 @@
     for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end();
          II != IE; ++II) {
       // Print the assembly for the instruction.
-      O << "\t";
       printMachineInstruction(II);
     }
   }

Modified: llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp?rev=46667&r1=46666&r2=46667&view=diff

==============================================================================
--- llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/Sparc/SparcAsmPrinter.cpp Sat Feb  2 02:39:46 2008
@@ -76,7 +76,7 @@
   return new SparcAsmPrinter(o, tm, tm.getTargetAsmInfo());
 }
 
-/// runOnMachineFunction - This uses the printMachineInstruction()
+/// runOnMachineFunction - This uses the printInstruction()
 /// method to print assembly for each instruction.
 ///
 bool SparcAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
@@ -121,7 +121,6 @@
     for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
          II != E; ++II) {
       // Print the assembly for the instruction.
-      O << "\t";
       printInstruction(II);
       ++EmittedInsts;
     }

Modified: llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp?rev=46667&r1=46666&r2=46667&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.cpp Sat Feb  2 02:39:46 2008
@@ -186,7 +186,6 @@
     for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end();
          II != IE; ++II) {
       // Print the assembly for the instruction.
-      O << "\t";
       printMachineInstruction(II);
     }
   }

Modified: llvm/trunk/lib/Target/X86/X86IntelAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86IntelAsmPrinter.cpp?rev=46667&r1=46666&r2=46667&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/X86IntelAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86IntelAsmPrinter.cpp Sat Feb  2 02:39:46 2008
@@ -84,7 +84,6 @@
     for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
          II != E; ++II) {
       // Print the assembly for the instruction.
-      O << "\t";
       printMachineInstruction(II);
     }
   }

Modified: llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp?rev=46667&r1=46666&r2=46667&view=diff

==============================================================================
--- llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp Sat Feb  2 02:39:46 2008
@@ -620,6 +620,7 @@
   O << "\";\n\n";
 
   O << "  if (MI->getOpcode() == TargetInstrInfo::INLINEASM) {\n"
+    << "    O << \"\\t\";\n"
     << "    printInlineAsm(MI);\n"
     << "    return true;\n"
     << "  } else if (MI->getOpcode() == TargetInstrInfo::LABEL) {\n"
@@ -630,6 +631,8 @@
     << "    return true;\n"
     << "  }\n\n";
   
+  O << "  O << \"\\t\";\n\n";
+
   O << "  // Emit the opcode for the instruction.\n"
     << "  unsigned Bits = OpInfo[MI->getOpcode()];\n"
     << "  if (Bits == 0) return false;\n"





More information about the llvm-commits mailing list