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
This commit is contained in:
Evan Cheng 2007-01-19 18:59:56 +00:00
parent 9201100b29
commit df62250cee
1 changed files with 7 additions and 0 deletions

View File

@ -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";