Speed up the asm printer a lot by not printing formatted LLVM asm output
authorChris Lattner <sabre@nondot.org>
Mon, 3 Oct 2005 07:08:36 +0000 (07:08 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 3 Oct 2005 07:08:36 +0000 (07:08 +0000)
for globals

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23608 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCAsmPrinter.cpp

index c81bad3545816891be7dd46db2742b990ddfcf16..ee428f9b1bc6281c4b4f9f28a6742c000b846ab4 100644 (file)
@@ -465,9 +465,7 @@ bool DarwinAsmPrinter::doFinalization(Module &M) {
           O << ".lcomm " << name << "," << Size << "," << Align;
         else
           O << ".comm " << name << "," << Size;
-        O << "\t\t; ";
-        WriteAsOperand(O, I, true, true, &M);
-        O << '\n';
+        O << "\t\t; '" << I->getName() << "'\n";
       } else {
         switch (I->getLinkage()) {
         case GlobalValue::LinkOnceLinkage:
@@ -497,11 +495,7 @@ bool DarwinAsmPrinter::doFinalization(Module &M) {
         }
 
         emitAlignment(Align);
-        O << name << ":\t\t\t\t; ";
-        WriteAsOperand(O, I, true, true, &M);
-        O << " = ";
-        WriteAsOperand(O, C, false, false, &M);
-        O << "\n";
+        O << name << ":\t\t\t\t; '" << I->getName() << "'\n";
         emitGlobalConstant(C);
       }
     }
@@ -704,7 +698,7 @@ bool AIXAsmPrinter::doFinalization(Module &M) {
         << "," << Log2_32((unsigned)TD.getTypeAlignment(I->getType()));
     }
     O << "\t\t# ";
-    WriteAsOperand(O, I, true, true, &M);
+    WriteAsOperand(O, I, false, true, &M);
     O << "\n";
   }