diff options
| author | Dan Gohman <gohman@apple.com> | 2007-05-03 16:38:57 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2007-05-03 16:38:57 +0000 |
| commit | e27e6e6fa883936a009960fab9d076763f304a9b (patch) | |
| tree | 6a03ba28ad20399878a300d2f453d0b40b8c9447 | |
| parent | 0974db91111ca494832f5ffa54f2764f0b490362 (diff) | |
| download | bcm5719-llvm-e27e6e6fa883936a009960fab9d076763f304a9b.tar.gz bcm5719-llvm-e27e6e6fa883936a009960fab9d076763f304a9b.zip | |
Sets the section names for fixed-size constants and use the mergeable
flag for ELF on x86 so that duplicate constants can be eliminated by
the linker. This matches what GCC does with its -fmerge-constants
option, which is enabled at most -O levels.
llvm-svn: 36666
| -rw-r--r-- | llvm/lib/Target/X86/X86TargetAsmInfo.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86TargetAsmInfo.cpp b/llvm/lib/Target/X86/X86TargetAsmInfo.cpp index 85ac7a4421e..67196b6f8fe 100644 --- a/llvm/lib/Target/X86/X86TargetAsmInfo.cpp +++ b/llvm/lib/Target/X86/X86TargetAsmInfo.cpp @@ -107,6 +107,11 @@ X86TargetAsmInfo::X86TargetAsmInfo(const X86TargetMachine &TM) { // HasDotFile - True if target asm supports .file directives. // bool HasDotFile; // Defaults to false. ReadOnlySection = "\t.section\t.rodata\n"; + FourByteConstantSection = "\t.section\t.rodata.cst4,\"aM\",@progbits,4"; + EightByteConstantSection = "\t.section\t.rodata.cst8,\"aM\",@progbits,8"; + SixteenByteConstantSection = + "\t.section\t.rodata.cst16,\"aM\",@progbits,16"; + CStringSection = "\t.section\t.rodata.str1.1,\"aMS\",@progbits,1"; PrivateGlobalPrefix = ".L"; WeakRefDirective = "\t.weak\t"; SetDirective = "\t.set\t"; |

