From: Dan Gohman Date: Thu, 3 May 2007 16:38:57 +0000 (+0000) Subject: Sets the section names for fixed-size constants and use the mergeable X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=6f858e250b689038f2ff4d903f51db74632fd09a;p=oota-llvm.git 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36666 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86TargetAsmInfo.cpp b/lib/Target/X86/X86TargetAsmInfo.cpp index 85ac7a4421e..67196b6f8fe 100644 --- a/lib/Target/X86/X86TargetAsmInfo.cpp +++ b/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";