Get rid of now unused {Four,Eight,Sixteen}ByteConstantSection

llvm-svn: 56580
This commit is contained in:
Anton Korobeynikov 2008-09-24 22:18:54 +00:00
parent 123afb88c4
commit 5906234c1d
9 changed files with 14 additions and 63 deletions

View 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;

View 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;
}

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

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

View 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",
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_();
}

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

View 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

View 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),

View File

@ -145,12 +145,9 @@ 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",
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";