summaryrefslogtreecommitdiff
path: root/lib/Target/MSP430/MSP430AsmPrinter.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2009-05-03 13:17:31 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2009-05-03 13:17:31 +0000
commit1394db0eebe36d7154dfc36b4bed0b435a62b397 (patch)
tree2f414224a298048b2afef3cd555212b8f975f411 /lib/Target/MSP430/MSP430AsmPrinter.cpp
parent6130fc8ea37e02b85c367a8726a3da58ae675278 (diff)
downloadllvm-1394db0eebe36d7154dfc36b4bed0b435a62b397.tar.gz
llvm-1394db0eebe36d7154dfc36b4bed0b435a62b397.tar.bz2
llvm-1394db0eebe36d7154dfc36b4bed0b435a62b397.tar.xz
Some eye-candy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70762 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/MSP430/MSP430AsmPrinter.cpp')
-rw-r--r--lib/Target/MSP430/MSP430AsmPrinter.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/Target/MSP430/MSP430AsmPrinter.cpp b/lib/Target/MSP430/MSP430AsmPrinter.cpp
index 0755e36981..c606112c2c 100644
--- a/lib/Target/MSP430/MSP430AsmPrinter.cpp
+++ b/lib/Target/MSP430/MSP430AsmPrinter.cpp
@@ -125,6 +125,7 @@ void MSP430AsmPrinter::emitFunctionHeader(const MachineFunction &MF) {
bool MSP430AsmPrinter::runOnMachineFunction(MachineFunction &MF) {
SetupMachineFunction(MF);
+ O << "\n\n";
// Print the 'header' of function
emitFunctionHeader(MF);
@@ -133,20 +134,18 @@ bool MSP430AsmPrinter::runOnMachineFunction(MachineFunction &MF) {
for (MachineFunction::const_iterator I = MF.begin(), E = MF.end();
I != E; ++I) {
// Print a label for the basic block.
- if (I != MF.begin()) {
- printBasicBlockLabel(I, true , true);
+ if (!VerboseAsm && (I->pred_empty() || I->isOnlyReachableByFallthrough())) {
+ // This is an entry block or a block that's only reachable via a
+ // fallthrough edge. In non-VerboseAsm mode, don't print the label.
+ } else {
+ printBasicBlockLabel(I, true, true, VerboseAsm);
O << '\n';
}
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
- II != E; ++II) {
+ II != E; ++II)
// Print the assembly for the instruction.
- O << "\t";
printMachineInstruction(II);
- }
-
- // Each Basic Block is separated by a newline
- O << '\n';
}
if (TAI->hasDotTypeDotSizeDirective())