[llvm-commits] [llvm] r67580 - in /llvm/trunk: lib/CodeGen/AsmPrinter/AsmPrinter.cpp lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp test/CodeGen/ARM/constants.ll test/CodeGen/ARM/long.ll test/CodeGen/X86/2007-06-04-tailmerge4.ll test/CodeGen/X86/2008-03-23-DarwinAsmComments.ll test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll
Evan Cheng
evan.cheng at apple.com
Mon Mar 23 17:17:41 PDT 2009
Author: evancheng
Date: Mon Mar 23 19:17:40 2009
New Revision: 67580
URL: http://llvm.org/viewvc/llvm-project?rev=67580&view=rev
Log:
Do not emit comments unless -asm-verbose.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp
llvm/trunk/test/CodeGen/ARM/constants.ll
llvm/trunk/test/CodeGen/ARM/long.ll
llvm/trunk/test/CodeGen/X86/2007-06-04-tailmerge4.ll
llvm/trunk/test/CodeGen/X86/2008-03-23-DarwinAsmComments.ll
llvm/trunk/test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=67580&r1=67579&r2=67580&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Mon Mar 23 19:17:40 2009
@@ -1010,30 +1010,42 @@
if (CFP->getType() == Type::DoubleTy) {
double Val = CFP->getValueAPF().convertToDouble(); // for comment only
uint64_t i = CFP->getValueAPF().bitcastToAPInt().getZExtValue();
- if (TAI->getData64bitsDirective(AddrSpace))
- O << TAI->getData64bitsDirective(AddrSpace) << i << '\t'
- << TAI->getCommentString() << " double value: " << Val << '\n';
- else if (TD->isBigEndian()) {
- O << TAI->getData32bitsDirective(AddrSpace) << unsigned(i >> 32)
- << '\t' << TAI->getCommentString()
- << " double most significant word " << Val << '\n';
- O << TAI->getData32bitsDirective(AddrSpace) << unsigned(i)
- << '\t' << TAI->getCommentString()
- << " double least significant word " << Val << '\n';
+ if (TAI->getData64bitsDirective(AddrSpace)) {
+ O << TAI->getData64bitsDirective(AddrSpace) << i;
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString() << " double value: " << Val;
+ O << '\n';
+ } else if (TD->isBigEndian()) {
+ O << TAI->getData32bitsDirective(AddrSpace) << unsigned(i >> 32);
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString()
+ << " double most significant word " << Val;
+ O << '\n';
+ O << TAI->getData32bitsDirective(AddrSpace) << unsigned(i);
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString()
+ << " double least significant word " << Val;
+ O << '\n';
} else {
- O << TAI->getData32bitsDirective(AddrSpace) << unsigned(i)
- << '\t' << TAI->getCommentString()
- << " double least significant word " << Val << '\n';
- O << TAI->getData32bitsDirective(AddrSpace) << unsigned(i >> 32)
- << '\t' << TAI->getCommentString()
- << " double most significant word " << Val << '\n';
+ O << TAI->getData32bitsDirective(AddrSpace) << unsigned(i);
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString()
+ << " double least significant word " << Val;
+ O << '\n';
+ O << TAI->getData32bitsDirective(AddrSpace) << unsigned(i >> 32);
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString()
+ << " double most significant word " << Val;
+ O << '\n';
}
return;
} else if (CFP->getType() == Type::FloatTy) {
float Val = CFP->getValueAPF().convertToFloat(); // for comment only
O << TAI->getData32bitsDirective(AddrSpace)
- << CFP->getValueAPF().bitcastToAPInt().getZExtValue()
- << '\t' << TAI->getCommentString() << " float " << Val << '\n';
+ << CFP->getValueAPF().bitcastToAPInt().getZExtValue();
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString() << " float " << Val;
+ O << '\n';
return;
} else if (CFP->getType() == Type::X86_FP80Ty) {
// all long double variants are printed as hex
@@ -1046,39 +1058,56 @@
DoubleVal.convert(APFloat::IEEEdouble, APFloat::rmNearestTiesToEven,
&ignored);
if (TD->isBigEndian()) {
- O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[1])
- << '\t' << TAI->getCommentString()
- << " long double most significant halfword of ~"
- << DoubleVal.convertToDouble() << '\n';
- O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[0] >> 48)
- << '\t' << TAI->getCommentString()
- << " long double next halfword\n";
- O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[0] >> 32)
- << '\t' << TAI->getCommentString()
- << " long double next halfword\n";
- O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[0] >> 16)
- << '\t' << TAI->getCommentString()
- << " long double next halfword\n";
- O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[0])
- << '\t' << TAI->getCommentString()
- << " long double least significant halfword\n";
+ O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[1]);
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString()
+ << " long double most significant halfword of ~"
+ << DoubleVal.convertToDouble();
+ O << '\n';
+ O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[0] >> 48);
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString() << " long double next halfword";
+ O << '\n';
+ O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[0] >> 32);
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString() << " long double next halfword";
+ O << '\n';
+ O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[0] >> 16);
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString() << " long double next halfword";
+ O << '\n';
+ O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[0]);
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString()
+ << " long double least significant halfword";
+ O << '\n';
} else {
- O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[0])
- << '\t' << TAI->getCommentString()
- << " long double least significant halfword of ~"
- << DoubleVal.convertToDouble() << '\n';
- O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[0] >> 16)
- << '\t' << TAI->getCommentString()
- << " long double next halfword\n";
- O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[0] >> 32)
- << '\t' << TAI->getCommentString()
- << " long double next halfword\n";
- O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[0] >> 48)
- << '\t' << TAI->getCommentString()
- << " long double next halfword\n";
- O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[1])
- << '\t' << TAI->getCommentString()
- << " long double most significant halfword\n";
+ O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[0]);
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString()
+ << " long double least significant halfword of ~"
+ << DoubleVal.convertToDouble();
+ O << '\n';
+ O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[0] >> 16);
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString()
+ << " long double next halfword";
+ O << '\n';
+ O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[0] >> 32);
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString()
+ << " long double next halfword";
+ O << '\n';
+ O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[0] >> 48);
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString()
+ << " long double next halfword";
+ O << '\n';
+ O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[1]);
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString()
+ << " long double most significant halfword";
+ O << '\n';
}
EmitZeros(TD->getTypePaddedSize(Type::X86_FP80Ty) -
TD->getTypeStoreSize(Type::X86_FP80Ty), AddrSpace);
@@ -1089,31 +1118,47 @@
APInt api = CFP->getValueAPF().bitcastToAPInt();
const uint64_t *p = api.getRawData();
if (TD->isBigEndian()) {
- O << TAI->getData32bitsDirective(AddrSpace) << uint32_t(p[0] >> 32)
- << '\t' << TAI->getCommentString()
- << " long double most significant word\n";
- O << TAI->getData32bitsDirective(AddrSpace) << uint32_t(p[0])
- << '\t' << TAI->getCommentString()
- << " long double next word\n";
- O << TAI->getData32bitsDirective(AddrSpace) << uint32_t(p[1] >> 32)
- << '\t' << TAI->getCommentString()
- << " long double next word\n";
- O << TAI->getData32bitsDirective(AddrSpace) << uint32_t(p[1])
- << '\t' << TAI->getCommentString()
- << " long double least significant word\n";
+ O << TAI->getData32bitsDirective(AddrSpace) << uint32_t(p[0] >> 32);
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString()
+ << " long double most significant word";
+ O << '\n';
+ O << TAI->getData32bitsDirective(AddrSpace) << uint32_t(p[0]);
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString()
+ << " long double next word";
+ O << '\n';
+ O << TAI->getData32bitsDirective(AddrSpace) << uint32_t(p[1] >> 32);
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString()
+ << " long double next word";
+ O << '\n';
+ O << TAI->getData32bitsDirective(AddrSpace) << uint32_t(p[1]);
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString()
+ << " long double least significant word";
+ O << '\n';
} else {
- O << TAI->getData32bitsDirective(AddrSpace) << uint32_t(p[1])
- << '\t' << TAI->getCommentString()
- << " long double least significant word\n";
- O << TAI->getData32bitsDirective(AddrSpace) << uint32_t(p[1] >> 32)
- << '\t' << TAI->getCommentString()
- << " long double next word\n";
- O << TAI->getData32bitsDirective(AddrSpace) << uint32_t(p[0])
- << '\t' << TAI->getCommentString()
- << " long double next word\n";
- O << TAI->getData32bitsDirective(AddrSpace) << uint32_t(p[0] >> 32)
- << '\t' << TAI->getCommentString()
- << " long double most significant word\n";
+ O << TAI->getData32bitsDirective(AddrSpace) << uint32_t(p[1]);
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString()
+ << " long double least significant word";
+ O << '\n';
+ O << TAI->getData32bitsDirective(AddrSpace) << uint32_t(p[1] >> 32);
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString()
+ << " long double next word";
+ O << '\n';
+ O << TAI->getData32bitsDirective(AddrSpace) << uint32_t(p[0]);
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString()
+ << " long double next word";
+ O << '\n';
+ O << TAI->getData32bitsDirective(AddrSpace) << uint32_t(p[0] >> 32);
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString()
+ << " long double most significant word";
+ O << '\n';
}
return;
} else assert(0 && "Floating point constant type not handled");
@@ -1140,19 +1185,27 @@
if (TAI->getData64bitsDirective(AddrSpace))
O << TAI->getData64bitsDirective(AddrSpace) << Val << '\n';
else if (TD->isBigEndian()) {
- O << TAI->getData32bitsDirective(AddrSpace) << unsigned(Val >> 32)
- << '\t' << TAI->getCommentString()
- << " Double-word most significant word " << Val << '\n';
- O << TAI->getData32bitsDirective(AddrSpace) << unsigned(Val)
- << '\t' << TAI->getCommentString()
- << " Double-word least significant word " << Val << '\n';
+ O << TAI->getData32bitsDirective(AddrSpace) << unsigned(Val >> 32);
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString()
+ << " Double-word most significant word " << Val;
+ O << '\n';
+ O << TAI->getData32bitsDirective(AddrSpace) << unsigned(Val);
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString()
+ << " Double-word least significant word " << Val;
+ O << '\n';
} else {
- O << TAI->getData32bitsDirective(AddrSpace) << unsigned(Val)
- << '\t' << TAI->getCommentString()
- << " Double-word least significant word " << Val << '\n';
- O << TAI->getData32bitsDirective(AddrSpace) << unsigned(Val >> 32)
- << '\t' << TAI->getCommentString()
- << " Double-word most significant word " << Val << '\n';
+ O << TAI->getData32bitsDirective(AddrSpace) << unsigned(Val);
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString()
+ << " Double-word least significant word " << Val;
+ O << '\n';
+ O << TAI->getData32bitsDirective(AddrSpace) << unsigned(Val >> 32);
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString()
+ << " Double-word most significant word " << Val;
+ O << '\n';
}
}
}
@@ -1188,10 +1241,12 @@
printDataDirective(type, AddrSpace);
EmitConstantValueOnly(CV);
- if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
- SmallString<40> S;
- CI->getValue().toStringUnsigned(S, 16);
- O << "\t\t\t" << TAI->getCommentString() << " 0x" << S.c_str();
+ if (VerboseAsm) {
+ if (const ConstantInt *CI = dyn_cast<ConstantInt>(CV)) {
+ SmallString<40> S;
+ CI->getValue().toStringUnsigned(S, 16);
+ O << "\t\t\t" << TAI->getCommentString() << " 0x" << S.c_str();
+ }
}
O << '\n';
}
@@ -1211,7 +1266,8 @@
if (!strcmp(Code, "private")) {
O << TAI->getPrivateGlobalPrefix();
} else if (!strcmp(Code, "comment")) {
- O << TAI->getCommentString();
+ if (VerboseAsm)
+ O << TAI->getCommentString();
} else if (!strcmp(Code, "uid")) {
// Assign a unique ID to this machine instruction.
static const MachineInstr *LastMI = 0;
@@ -1441,8 +1497,9 @@
/// printImplicitDef - This method prints the specified machine instruction
/// that is an implicit def.
void AsmPrinter::printImplicitDef(const MachineInstr *MI) const {
- O << '\t' << TAI->getCommentString() << " implicit-def: "
- << TRI->getAsmName(MI->getOperand(0).getReg()) << '\n';
+ if (VerboseAsm)
+ O << '\t' << TAI->getCommentString() << " implicit-def: "
+ << TRI->getAsmName(MI->getOperand(0).getReg()) << '\n';
}
/// printLabel - This method prints a local label used by debug and
Modified: llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp?rev=67580&r1=67579&r2=67580&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp Mon Mar 23 19:17:40 2009
@@ -255,7 +255,7 @@
I != E; ++I) {
// Print a label for the basic block.
if (I != MF.begin()) {
- printBasicBlockLabel(I, true, true);
+ printBasicBlockLabel(I, true, true, VerboseAsm);
O << '\n';
}
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
@@ -356,7 +356,9 @@
if (Rot) {
O << "#" << Imm << ", " << Rot;
// Pretty printed version.
- O << ' ' << TAI->getCommentString() << ' ' << (int)ARM_AM::rotr32(Imm, Rot);
+ if (VerboseAsm)
+ O << ' ' << TAI->getCommentString()
+ << ' ' << (int)ARM_AM::rotr32(Imm, Rot);
} else {
O << "#" << Imm;
}
@@ -870,8 +872,11 @@
O << "\t.globl " << name << '\n'
<< TAI->getWeakDefDirective() << name << '\n';
EmitAlignment(Align, GVar);
- O << name << ":\t\t\t\t" << TAI->getCommentString() << ' ';
- PrintUnmangledNameSafely(GVar, O);
+ O << name << ":";
+ if (VerboseAsm) {
+ O << "\t\t\t\t" << TAI->getCommentString() << ' ';
+ PrintUnmangledNameSafely(GVar, O);
+ }
O << '\n';
EmitGlobalConstant(C);
return;
@@ -892,8 +897,10 @@
if (TAI->getCOMMDirectiveTakesAlignment())
O << "," << (TAI->getAlignmentIsInBytes() ? (1 << Align) : Align);
}
- O << "\t\t" << TAI->getCommentString() << " ";
- PrintUnmangledNameSafely(GVar, O);
+ if (VerboseAsm) {
+ O << "\t\t" << TAI->getCommentString() << " ";
+ PrintUnmangledNameSafely(GVar, O);
+ }
O << "\n";
return;
}
@@ -928,8 +935,11 @@
}
EmitAlignment(Align, GVar);
- O << name << ":\t\t\t\t" << TAI->getCommentString() << " ";
- PrintUnmangledNameSafely(GVar, O);
+ O << name << ":";
+ if (VerboseAsm) {
+ O << "\t\t\t\t" << TAI->getCommentString() << " ";
+ PrintUnmangledNameSafely(GVar, O);
+ }
O << "\n";
if (TAI->hasDotTypeDotSizeDirective())
O << "\t.size " << name << ", " << Size << "\n";
Modified: llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp?rev=67580&r1=67579&r2=67580&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp Mon Mar 23 19:17:40 2009
@@ -704,9 +704,12 @@
} else {
O << ".comm " << name << ',' << Size;
}
- O << "\t\t" << TAI->getCommentString() << " '";
- PrintUnmangledNameSafely(GVar, O);
- O << "'\n";
+ if (VerboseAsm) {
+ O << "\t\t" << TAI->getCommentString() << " '";
+ PrintUnmangledNameSafely(GVar, O);
+ O << "'";
+ }
+ O << '\n';
return;
}
@@ -737,9 +740,13 @@
}
EmitAlignment(Align, GVar);
- O << name << ":\t\t\t\t" << TAI->getCommentString() << " '";
- PrintUnmangledNameSafely(GVar, O);
- O << "'\n";
+ O << name << ":";
+ if (VerboseAsm) {
+ O << "\t\t\t\t" << TAI->getCommentString() << " '";
+ PrintUnmangledNameSafely(GVar, O);
+ O << "'";
+ }
+ O << '\n';
// If the initializer is a extern weak symbol, remember to emit the weak
// reference!
@@ -819,7 +826,7 @@
I != E; ++I) {
// Print a label for the basic block.
if (I != MF.begin()) {
- printBasicBlockLabel(I, true, true);
+ printBasicBlockLabel(I, true, true, VerboseAsm);
O << '\n';
}
for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end();
@@ -938,8 +945,11 @@
O << "\t.globl " << name << '\n'
<< TAI->getWeakDefDirective() << name << '\n';
EmitAlignment(Align, GVar);
- O << name << ":\t\t\t\t" << TAI->getCommentString() << " ";
- PrintUnmangledNameSafely(GVar, O);
+ O << name << ":";
+ if (VerboseAsm) {
+ O << "\t\t\t\t" << TAI->getCommentString() << " ";
+ PrintUnmangledNameSafely(GVar, O);
+ }
O << '\n';
EmitGlobalConstant(C);
return;
@@ -949,9 +959,12 @@
if (Subtarget.isDarwin9())
O << ',' << Align;
}
- O << "\t\t" << TAI->getCommentString() << " '";
- PrintUnmangledNameSafely(GVar, O);
- O << "'\n";
+ if (VerboseAsm) {
+ O << "\t\t" << TAI->getCommentString() << " '";
+ PrintUnmangledNameSafely(GVar, O);
+ O << "'";
+ }
+ O << '\n';
return;
}
@@ -980,9 +993,13 @@
}
EmitAlignment(Align, GVar);
- O << name << ":\t\t\t\t" << TAI->getCommentString() << " '";
- PrintUnmangledNameSafely(GVar, O);
- O << "'\n";
+ O << name << ":";
+ if (VerboseAsm) {
+ O << "\t\t\t\t" << TAI->getCommentString() << " '";
+ PrintUnmangledNameSafely(GVar, O);
+ O << "'";
+ }
+ O << '\n';
// If the initializer is a extern weak symbol, remember to emit the weak
// reference!
Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp?rev=67580&r1=67579&r2=67580&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp Mon Mar 23 19:17:40 2009
@@ -239,7 +239,7 @@
I != E; ++I) {
// Print a label for the basic block.
if (!I->pred_empty()) {
- printBasicBlockLabel(I, true, true);
+ printBasicBlockLabel(I, true, true, VerboseAsm);
O << '\n';
}
for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end();
@@ -315,7 +315,7 @@
O << MO.getImm();
return;
case MachineOperand::MO_MachineBasicBlock:
- printBasicBlockLabel(MO.getMBB());
+ printBasicBlockLabel(MO.getMBB(), false, false, VerboseAsm);
return;
case MachineOperand::MO_JumpTableIndex: {
bool isMemOp = Modifier && !strcmp(Modifier, "mem");
@@ -829,8 +829,11 @@
O << "\t.globl " << name << '\n'
<< TAI->getWeakDefDirective() << name << '\n';
EmitAlignment(Align, GVar);
- O << name << ":\t\t\t\t" << TAI->getCommentString() << ' ';
- PrintUnmangledNameSafely(GVar, O);
+ O << name << ":";
+ if (VerboseAsm) {
+ O << name << "\t\t\t\t" << TAI->getCommentString() << ' ';
+ PrintUnmangledNameSafely(GVar, O);
+ }
O << '\n';
EmitGlobalConstant(C);
return;
@@ -848,8 +851,10 @@
if (TAI->getCOMMDirectiveTakesAlignment())
O << ',' << (TAI->getAlignmentIsInBytes() ? (1 << Align) : Align);
}
- O << "\t\t" << TAI->getCommentString() << ' ';
- PrintUnmangledNameSafely(GVar, O);
+ if (VerboseAsm) {
+ O << "\t\t" << TAI->getCommentString() << ' ';
+ PrintUnmangledNameSafely(GVar, O);
+ }
O << '\n';
return;
}
@@ -887,8 +892,11 @@
}
EmitAlignment(Align, GVar);
- O << name << ":\t\t\t\t" << TAI->getCommentString() << ' ';
- PrintUnmangledNameSafely(GVar, O);
+ O << name << ":";
+ if (VerboseAsm){
+ O << name << "\t\t\t\t" << TAI->getCommentString() << ' ';
+ PrintUnmangledNameSafely(GVar, O);
+ }
O << '\n';
if (TAI->hasDotTypeDotSizeDirective())
O << "\t.size\t" << name << ", " << Size << '\n';
Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp?rev=67580&r1=67579&r2=67580&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.cpp Mon Mar 23 19:17:40 2009
@@ -489,8 +489,11 @@
if (!bCustomSegment)
EmitAlignment(Align, I);
- O << name << ":\t\t\t\t" << TAI->getCommentString()
- << " " << I->getName() << '\n';
+ O << name << ":";
+ if (VerboseAsm)
+ O << name << "\t\t\t\t" << TAI->getCommentString()
+ << " " << I->getName();
+ O << '\n';
EmitGlobalConstant(C);
Modified: llvm/trunk/test/CodeGen/ARM/constants.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/constants.ll?rev=67580&r1=67579&r2=67580&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/constants.ll (original)
+++ llvm/trunk/test/CodeGen/ARM/constants.ll Mon Mar 23 19:17:40 2009
@@ -2,11 +2,11 @@
; RUN: grep {mov r0, #0} | count 1
; RUN: llvm-as < %s | llc -march=arm | \
; RUN: grep {mov r0, #255$} | count 1
-; RUN: llvm-as < %s | llc -march=arm | \
+; RUN: llvm-as < %s | llc -march=arm -asm-verbose | \
; RUN: grep {mov r0.*256} | count 1
-; RUN: llvm-as < %s | llc -march=arm | grep {orr.*256} | count 1
-; RUN: llvm-as < %s | llc -march=arm | grep {mov r0, .*-1073741761} | count 1
-; RUN: llvm-as < %s | llc -march=arm | grep {mov r0, .*1008} | count 1
+; RUN: llvm-as < %s | llc -march=arm -asm-verbose | grep {orr.*256} | count 1
+; RUN: llvm-as < %s | llc -march=arm -asm-verbose | grep {mov r0, .*-1073741761} | count 1
+; RUN: llvm-as < %s | llc -march=arm -asm-verbose | grep {mov r0, .*1008} | count 1
; RUN: llvm-as < %s | llc -march=arm | grep {cmp r0, #1, 16} | count 1
define i32 @f1() {
Modified: llvm/trunk/test/CodeGen/ARM/long.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/long.ll?rev=67580&r1=67579&r2=67580&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/long.ll (original)
+++ llvm/trunk/test/CodeGen/ARM/long.ll Mon Mar 23 19:17:40 2009
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -march=arm | \
+; RUN: llvm-as < %s | llc -march=arm -asm-verbose | \
; RUN: grep -- {-2147483648} | count 3
; RUN: llvm-as < %s | llc -march=arm | grep mvn | count 3
; RUN: llvm-as < %s | llc -march=arm | grep adds | count 1
Modified: llvm/trunk/test/CodeGen/X86/2007-06-04-tailmerge4.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2007-06-04-tailmerge4.ll?rev=67580&r1=67579&r2=67580&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2007-06-04-tailmerge4.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2007-06-04-tailmerge4.ll Mon Mar 23 19:17:40 2009
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -enable-eh | grep invcont131
+; RUN: llvm-as < %s | llc -enable-eh -asm-verbose | grep invcont131
; PR 1496: tail merge was incorrectly removing this block
; ModuleID = 'report.1.bc'
Modified: llvm/trunk/test/CodeGen/X86/2008-03-23-DarwinAsmComments.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-03-23-DarwinAsmComments.ll?rev=67580&r1=67579&r2=67580&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2008-03-23-DarwinAsmComments.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2008-03-23-DarwinAsmComments.ll Mon Mar 23 19:17:40 2009
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin | grep {#} | not grep -v {##}
+; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin -asm-verbose | grep {#} | not grep -v {##}
%struct.AGenericCall = type { %struct.AGenericManager*, %struct.ComponentParameters*, i32* }
%struct.AGenericManager = type <{ i8 }>
Modified: llvm/trunk/test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll?rev=67580&r1=67579&r2=67580&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2009-03-16-PHIElimInLPad.ll Mon Mar 23 19:17:40 2009
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -march=x86 | grep -A 1 lpad | grep Llabel
+; RUN: llvm-as < %s | llc -march=x86 -asm-verbose | grep -A 1 lpad | grep Llabel
; Check that register copies in the landing pad come after the EH_LABEL
declare i32 @f()
More information about the llvm-commits
mailing list