From 6481873dc042d33c974399a7761a72524d1fe957 Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Wed, 24 Sep 2008 22:18:54 +0000 Subject: [PATCH] Get rid of now unused {Four,Eight,Sixteen}ByteConstantSection git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56580 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/DarwinTargetAsmInfo.h | 3 +++ include/llvm/Target/TargetAsmInfo.h | 28 ----------------------- lib/Target/ARM/ARMTargetAsmInfo.cpp | 5 ---- lib/Target/CellSPU/SPUTargetAsmInfo.cpp | 2 -- lib/Target/DarwinTargetAsmInfo.cpp | 17 +++++++------- lib/Target/Mips/MipsTargetAsmInfo.cpp | 1 - lib/Target/PowerPC/PPCTargetAsmInfo.cpp | 5 ---- lib/Target/TargetAsmInfo.cpp | 6 ----- lib/Target/X86/X86TargetAsmInfo.cpp | 10 ++------ 9 files changed, 14 insertions(+), 63 deletions(-) diff --git a/include/llvm/Target/DarwinTargetAsmInfo.h b/include/llvm/Target/DarwinTargetAsmInfo.h index 4abf4b7cfd1..0ca5a705556 100644 --- a/include/llvm/Target/DarwinTargetAsmInfo.h +++ b/include/llvm/Target/DarwinTargetAsmInfo.h @@ -29,6 +29,9 @@ namespace llvm { const Section* ConstDataCoalSection; const Section* ConstDataSection; const Section* DataCoalSection; + const Section* FourByteConstantSection; + const Section* EightByteConstantSection; + const Section* SixteenByteConstantSection; explicit DarwinTargetAsmInfo(const TargetMachine &TM); virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const; diff --git a/include/llvm/Target/TargetAsmInfo.h b/include/llvm/Target/TargetAsmInfo.h index e1484e5faf1..0d5d7cd2c40 100644 --- a/include/llvm/Target/TargetAsmInfo.h +++ b/include/llvm/Target/TargetAsmInfo.h @@ -361,16 +361,6 @@ namespace llvm { /// Defaults to "\t.section .dtors,\"aw\",@progbits". const char *StaticDtorsSection; - /// FourByteConstantSection, EightByteConstantSection, - /// SixteenByteConstantSection - These are special sections where we place - /// 4-, 8-, and 16- byte constant literals. - const char *FourByteConstantSection; - const Section *FourByteConstantSection_; - const char *EightByteConstantSection; - const Section *EightByteConstantSection_; - const char *SixteenByteConstantSection; - const Section *SixteenByteConstantSection_; - //===--- Global Variable Emission Directives --------------------------===// /// GlobalDirective - This is the directive used to declare a global entity. @@ -757,24 +747,6 @@ namespace llvm { const char *getStaticDtorsSection() const { return StaticDtorsSection; } - const char *getFourByteConstantSection() const { - return FourByteConstantSection; - } - const Section *getFourByteConstantSection_() const { - return FourByteConstantSection_; - } - const char *getEightByteConstantSection() const { - return EightByteConstantSection; - } - const Section *getEightByteConstantSection_() const { - return EightByteConstantSection_; - } - const char *getSixteenByteConstantSection() const { - return SixteenByteConstantSection; - } - const Section *getSixteenByteConstantSection_() const { - return SixteenByteConstantSection_; - } const char *getGlobalDirective() const { return GlobalDirective; } diff --git a/lib/Target/ARM/ARMTargetAsmInfo.cpp b/lib/Target/ARM/ARMTargetAsmInfo.cpp index 3686da8859a..96451ada1f6 100644 --- a/lib/Target/ARM/ARMTargetAsmInfo.cpp +++ b/lib/Target/ARM/ARMTargetAsmInfo.cpp @@ -72,8 +72,6 @@ ARMDarwinTargetAsmInfo::ARMDarwinTargetAsmInfo(const ARMTargetMachine &TM): ProtectedDirective = NULL; JumpTableDataSection = ".const"; CStringSection = "\t.cstring"; - FourByteConstantSection = "\t.literal4\n"; - EightByteConstantSection = "\t.literal8\n"; ReadOnlySection = "\t.const\n"; HasDotTypeDotSizeDirective = false; NeedsIndirectEncoding = true; @@ -115,9 +113,6 @@ ARMELFTargetAsmInfo::ARMELFTargetAsmInfo(const ARMTargetMachine &TM): AbsoluteDebugSectionOffsets = true; CStringSection = ".rodata.str"; 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"; PrivateGlobalPrefix = ".L"; WeakRefDirective = "\t.weak\t"; SetDirective = "\t.set\t"; diff --git a/lib/Target/CellSPU/SPUTargetAsmInfo.cpp b/lib/Target/CellSPU/SPUTargetAsmInfo.cpp index 0d7aac15a05..f79deed5957 100644 --- a/lib/Target/CellSPU/SPUTargetAsmInfo.cpp +++ b/lib/Target/CellSPU/SPUTargetAsmInfo.cpp @@ -31,8 +31,6 @@ SPUTargetAsmInfo::SPUTargetAsmInfo(const SPUTargetMachine &TM) { CStringSection = "\t.cstring"; StaticCtorsSection = ".mod_init_func"; StaticDtorsSection = ".mod_term_func"; - FourByteConstantSection = ".const"; - SixteenByteConstantSection = "\t.section\t.rodata.cst16,\"aM\",@progbits,16"; InlineAsmStart = "# InlineAsm Start"; InlineAsmEnd = "# InlineAsm End"; diff --git a/lib/Target/DarwinTargetAsmInfo.cpp b/lib/Target/DarwinTargetAsmInfo.cpp index 0ae304e2d49..5612515027a 100644 --- a/lib/Target/DarwinTargetAsmInfo.cpp +++ b/lib/Target/DarwinTargetAsmInfo.cpp @@ -29,13 +29,14 @@ DarwinTargetAsmInfo::DarwinTargetAsmInfo(const TargetMachine &TM) { CStringSection_ = getUnnamedSection("\t.cstring", SectionFlags::Mergeable | SectionFlags::Strings); - FourByteConstantSection_ = getUnnamedSection("\t.literal4\n", + FourByteConstantSection = getUnnamedSection("\t.literal4\n", + SectionFlags::Mergeable); + EightByteConstantSection = getUnnamedSection("\t.literal8\n", SectionFlags::Mergeable); - EightByteConstantSection_ = getUnnamedSection("\t.literal8\n", - SectionFlags::Mergeable); // Note: 16-byte constant section is subtarget specific and should be provided - // there. + // there, if needed. + SixteenByteConstantSection = 0; ReadOnlySection_ = getUnnamedSection("\t.const\n", SectionFlags::None); @@ -139,11 +140,11 @@ DarwinTargetAsmInfo::MergeableConstSection(const Type *Ty) const { unsigned Size = TD->getABITypeSize(Ty); if (Size == 4) - return FourByteConstantSection_; + return FourByteConstantSection; else if (Size == 8) - return EightByteConstantSection_; - else if (Size == 16 && SixteenByteConstantSection_) - return SixteenByteConstantSection_; + return EightByteConstantSection; + else if (Size == 16 && SixteenByteConstantSection) + return SixteenByteConstantSection; return getReadOnlySection_(); } diff --git a/lib/Target/Mips/MipsTargetAsmInfo.cpp b/lib/Target/Mips/MipsTargetAsmInfo.cpp index 04edd0d4b53..5c5d7cacdd8 100644 --- a/lib/Target/Mips/MipsTargetAsmInfo.cpp +++ b/lib/Target/Mips/MipsTargetAsmInfo.cpp @@ -34,7 +34,6 @@ MipsTargetAsmInfo::MipsTargetAsmInfo(const MipsTargetMachine &TM): ZeroDirective = "\t.space\t"; BSSSection = "\t.section\t.bss"; CStringSection = ".rodata.str"; - FourByteConstantSection = "\t.section\t.rodata.cst4,\"aM\",@progbits,4"; if (!Subtarget->hasABICall()) { JumpTableDirective = "\t.word\t"; diff --git a/lib/Target/PowerPC/PPCTargetAsmInfo.cpp b/lib/Target/PowerPC/PPCTargetAsmInfo.cpp index fc98e57c82a..89800247589 100644 --- a/lib/Target/PowerPC/PPCTargetAsmInfo.cpp +++ b/lib/Target/PowerPC/PPCTargetAsmInfo.cpp @@ -43,8 +43,6 @@ PPCDarwinTargetAsmInfo::PPCDarwinTargetAsmInfo(const PPCTargetMachine &TM): ConstantPoolSection = "\t.const\t"; JumpTableDataSection = ".const"; CStringSection = "\t.cstring"; - FourByteConstantSection = "\t.literal4\n"; - EightByteConstantSection = "\t.literal8\n"; ReadOnlySection = "\t.const\n"; if (TM.getRelocationModel() == Reloc::Static) { StaticCtorsSection = ".constructor"; @@ -140,9 +138,6 @@ PPCLinuxTargetAsmInfo::PPCLinuxTargetAsmInfo(const PPCTargetMachine &TM) : DwarfMacInfoSection = "\t.section\t.debug_macinfo,\"\",@progbits"; ReadOnlySection = "\t.section\t.rodata"; - 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"; PCSymbol = "."; // Set up DWARF directives diff --git a/lib/Target/TargetAsmInfo.cpp b/lib/Target/TargetAsmInfo.cpp index d85e5987570..ab4db2af3ee 100644 --- a/lib/Target/TargetAsmInfo.cpp +++ b/lib/Target/TargetAsmInfo.cpp @@ -81,12 +81,6 @@ TargetAsmInfo::TargetAsmInfo() : CStringSection_(0), StaticCtorsSection("\t.section .ctors,\"aw\",@progbits"), StaticDtorsSection("\t.section .dtors,\"aw\",@progbits"), - FourByteConstantSection(0), - FourByteConstantSection_(0), - EightByteConstantSection(0), - EightByteConstantSection_(0), - SixteenByteConstantSection(0), - SixteenByteConstantSection_(0), GlobalDirective("\t.globl\t"), SetDirective(0), LCOMMDirective(0), diff --git a/lib/Target/X86/X86TargetAsmInfo.cpp b/lib/Target/X86/X86TargetAsmInfo.cpp index b31da8f900a..1097302ca7e 100644 --- a/lib/Target/X86/X86TargetAsmInfo.cpp +++ b/lib/Target/X86/X86TargetAsmInfo.cpp @@ -145,13 +145,10 @@ X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM): ConstantPoolSection = "\t.const\n"; JumpTableDataSection = "\t.const\n"; CStringSection = "\t.cstring"; - FourByteConstantSection = "\t.literal4\n"; - EightByteConstantSection = "\t.literal8\n"; // FIXME: Why don't always use this section? if (is64Bit) { - SixteenByteConstantSection = "\t.literal16\n"; - SixteenByteConstantSection_ = getUnnamedSection("\t.literal16\n", - SectionFlags::Mergeable); + SixteenByteConstantSection = getUnnamedSection("\t.literal16\n", + SectionFlags::Mergeable); } ReadOnlySection = "\t.const\n"; @@ -233,9 +230,6 @@ X86ELFTargetAsmInfo::X86ELFTargetAsmInfo(const X86TargetMachine &TM): X86TargetAsmInfo(TM), ELFTargetAsmInfo(TM) { ReadOnlySection = ".rodata"; - 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 = ".rodata.str"; PrivateGlobalPrefix = ".L"; WeakRefDirective = "\t.weak\t";