diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2007-01-19 18:59:56 +0000 |
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2007-01-19 18:59:56 +0000 |
| commit | df62250cee17b49be0a33d33817308b071ca132f (patch) | |
| tree | 637c86a399e400ac07b8ad113483405603017722 /llvm/lib | |
| parent | 9201100b297d37b0911172a6e329415af3085bc9 (diff) | |
| download | bcm5719-llvm-df62250cee17b49be0a33d33817308b071ca132f.tar.gz bcm5719-llvm-df62250cee17b49be0a33d33817308b071ca132f.zip | |
Modify emission of jump tables on darwin to emit an extra "l" label that
delimits the boundaries of jump tables. This lets the linker's dead code
stripping optimization do a better job.
llvm-svn: 33362
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp b/llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp index 65848e53765..d70ef6d9013 100644 --- a/llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp +++ b/llvm/lib/Target/ARM/ARMTargetAsmInfo.cpp @@ -33,6 +33,13 @@ ARMTargetAsmInfo::ARMTargetAsmInfo(const ARMTargetMachine &TM) { LCOMMDirective = "\t.lcomm\t"; COMMDirectiveTakesAlignment = false; + // In non-PIC modes, emit a special label before jump tables so that the + // linker can perform more accurate dead code stripping. + if (TM.getRelocationModel() != Reloc::PIC_) { + // Emit a local label that is preserved until the linker runs. + JumpTableSpecialLabelPrefix = "l"; + } + NeedsSet = true; DwarfAbbrevSection = ".section __DWARF,__debug_abbrev,regular,debug"; DwarfInfoSection = ".section __DWARF,__debug_info,regular,debug"; |

