Get rid of now unused {Four,Eight,Sixteen}ByteConstantSection
authorAnton Korobeynikov <asl@math.spbu.ru>
Wed, 24 Sep 2008 22:18:54 +0000 (22:18 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Wed, 24 Sep 2008 22:18:54 +0000 (22:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56580 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/DarwinTargetAsmInfo.h
include/llvm/Target/TargetAsmInfo.h
lib/Target/ARM/ARMTargetAsmInfo.cpp
lib/Target/CellSPU/SPUTargetAsmInfo.cpp
lib/Target/DarwinTargetAsmInfo.cpp
lib/Target/Mips/MipsTargetAsmInfo.cpp
lib/Target/PowerPC/PPCTargetAsmInfo.cpp
lib/Target/TargetAsmInfo.cpp
lib/Target/X86/X86TargetAsmInfo.cpp

index 4abf4b7cfd112335a95f8adc5b7e0f59f565856b..0ca5a705556977b93219fa9eac52dca3be53275e 100644 (file)
@@ -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;
index e1484e5faf1da09ee1fa70caceeda891a343b229..0d5d7cd2c40b8cc94ea9355103f1bae1cdbf2725 100644 (file)
@@ -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;
     }
index 3686da8859a4500a2ccf011e3f0e2b37c739fc74..96451ada1f67be6202ba5f0fd083aa71714b93aa 100644 (file)
@@ -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";
index 0d7aac15a05b0d7aae33b9f4b95eb751e4673744..f79deed5957cde25eba825edb623c138be49d7d6 100644 (file)
@@ -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";
   
index 0ae304e2d491867013436f967c163df17b454286..5612515027ad415a3b1b248112e0aa459d5176bd 100644 (file)
@@ -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_();
 }
index 04edd0d4b537c8031f08910dbae4ab9e922f2a71..5c5d7cacdd845641d6a6c4aecd1a40a2207132a7 100644 (file)
@@ -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";
index fc98e57c82a204cd5df6bb2958c5f55f0e9e43a5..89800247589e9a0a90a92a05096851c534275380 100644 (file)
@@ -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
index d85e5987570527b5b9a1fad50a0e10903005c0cf..ab4db2af3ee71b25d897f479815cf11e7b0b0d52 100644 (file)
@@ -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),
index b31da8f900a4c862fa175bae01913eea38fea298..1097302ca7e36ecc4041e768eac3f1c6d2dca7f7 100644 (file)
@@ -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";