llvm.org GIT mirror llvm / 6481873
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 Anton Korobeynikov 11 years ago
9 changed file(s) with 14 addition(s) and 63 deletion(s). Raw diff Collapse all Expand all
2828 const Section* ConstDataCoalSection;
2929 const Section* ConstDataSection;
3030 const Section* DataCoalSection;
31 const Section* FourByteConstantSection;
32 const Section* EightByteConstantSection;
33 const Section* SixteenByteConstantSection;
3134
3235 explicit DarwinTargetAsmInfo(const TargetMachine &TM);
3336 virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
360360 /// Defaults to "\t.section .dtors,\"aw\",@progbits".
361361 const char *StaticDtorsSection;
362362
363 /// FourByteConstantSection, EightByteConstantSection,
364 /// SixteenByteConstantSection - These are special sections where we place
365 /// 4-, 8-, and 16- byte constant literals.
366 const char *FourByteConstantSection;
367 const Section *FourByteConstantSection_;
368 const char *EightByteConstantSection;
369 const Section *EightByteConstantSection_;
370 const char *SixteenByteConstantSection;
371 const Section *SixteenByteConstantSection_;
372
373363 //===--- Global Variable Emission Directives --------------------------===//
374364
375365 /// GlobalDirective - This is the directive used to declare a global entity.
756746 const char *getStaticDtorsSection() const {
757747 return StaticDtorsSection;
758748 }
759 const char *getFourByteConstantSection() const {
760 return FourByteConstantSection;
761 }
762 const Section *getFourByteConstantSection_() const {
763 return FourByteConstantSection_;
764 }
765 const char *getEightByteConstantSection() const {
766 return EightByteConstantSection;
767 }
768 const Section *getEightByteConstantSection_() const {
769 return EightByteConstantSection_;
770 }
771 const char *getSixteenByteConstantSection() const {
772 return SixteenByteConstantSection;
773 }
774 const Section *getSixteenByteConstantSection_() const {
775 return SixteenByteConstantSection_;
776 }
777749 const char *getGlobalDirective() const {
778750 return GlobalDirective;
779751 }
7171 ProtectedDirective = NULL;
7272 JumpTableDataSection = ".const";
7373 CStringSection = "\t.cstring";
74 FourByteConstantSection = "\t.literal4\n";
75 EightByteConstantSection = "\t.literal8\n";
7674 ReadOnlySection = "\t.const\n";
7775 HasDotTypeDotSizeDirective = false;
7876 NeedsIndirectEncoding = true;
114112 AbsoluteDebugSectionOffsets = true;
115113 CStringSection = ".rodata.str";
116114 ReadOnlySection = "\t.section\t.rodata\n";
117 FourByteConstantSection = "\t.section\t.rodata.cst4,\"aM\",@progbits,4";
118 EightByteConstantSection = "\t.section\t.rodata.cst8,\"aM\",@progbits,8";
119 SixteenByteConstantSection = "\t.section\t.rodata.cst16,\"aM\",@progbits,16";
120115 PrivateGlobalPrefix = ".L";
121116 WeakRefDirective = "\t.weak\t";
122117 SetDirective = "\t.set\t";
3030 CStringSection = "\t.cstring";
3131 StaticCtorsSection = ".mod_init_func";
3232 StaticDtorsSection = ".mod_term_func";
33 FourByteConstantSection = ".const";
34 SixteenByteConstantSection = "\t.section\t.rodata.cst16,\"aM\",@progbits,16";
3533 InlineAsmStart = "# InlineAsm Start";
3634 InlineAsmEnd = "# InlineAsm End";
3735
2828
2929 CStringSection_ = getUnnamedSection("\t.cstring",
3030 SectionFlags::Mergeable | SectionFlags::Strings);
31 FourByteConstantSection_ = getUnnamedSection("\t.literal4\n",
31 FourByteConstantSection = getUnnamedSection("\t.literal4\n",
32 SectionFlags::Mergeable);
33 EightByteConstantSection = getUnnamedSection("\t.literal8\n",
3234 SectionFlags::Mergeable);
33 EightByteConstantSection_ = getUnnamedSection("\t.literal8\n",
34 SectionFlags::Mergeable);
3535
3636 // Note: 16-byte constant section is subtarget specific and should be provided
37 // there.
37 // there, if needed.
38 SixteenByteConstantSection = 0;
3839
3940 ReadOnlySection_ = getUnnamedSection("\t.const\n", SectionFlags::None);
4041
138139
139140 unsigned Size = TD->getABITypeSize(Ty);
140141 if (Size == 4)
141 return FourByteConstantSection_;
142 return FourByteConstantSection;
142143 else if (Size == 8)
143 return EightByteConstantSection_;
144 else if (Size == 16 && SixteenByteConstantSection_)
145 return SixteenByteConstantSection_;
144 return EightByteConstantSection;
145 else if (Size == 16 && SixteenByteConstantSection)
146 return SixteenByteConstantSection;
146147
147148 return getReadOnlySection_();
148149 }
3333 ZeroDirective = "\t.space\t";
3434 BSSSection = "\t.section\t.bss";
3535 CStringSection = ".rodata.str";
36 FourByteConstantSection = "\t.section\t.rodata.cst4,\"aM\",@progbits,4";
3736
3837 if (!Subtarget->hasABICall()) {
3938 JumpTableDirective = "\t.word\t";
4242 ConstantPoolSection = "\t.const\t";
4343 JumpTableDataSection = ".const";
4444 CStringSection = "\t.cstring";
45 FourByteConstantSection = "\t.literal4\n";
46 EightByteConstantSection = "\t.literal8\n";
4745 ReadOnlySection = "\t.const\n";
4846 if (TM.getRelocationModel() == Reloc::Static) {
4947 StaticCtorsSection = ".constructor";
139137 DwarfMacInfoSection = "\t.section\t.debug_macinfo,\"\",@progbits";
140138
141139 ReadOnlySection = "\t.section\t.rodata";
142 FourByteConstantSection = "\t.section\t.rodata.cst4,\"aM\",@progbits,4";
143 EightByteConstantSection = "\t.section\t.rodata.cst8,\"aM\",@progbits,8";
144 SixteenByteConstantSection = "\t.section\t.rodata.cst16,\"aM\",@progbits,16";
145140 PCSymbol = ".";
146141
147142 // Set up DWARF directives
8080 CStringSection_(0),
8181 StaticCtorsSection("\t.section .ctors,\"aw\",@progbits"),
8282 StaticDtorsSection("\t.section .dtors,\"aw\",@progbits"),
83 FourByteConstantSection(0),
84 FourByteConstantSection_(0),
85 EightByteConstantSection(0),
86 EightByteConstantSection_(0),
87 SixteenByteConstantSection(0),
88 SixteenByteConstantSection_(0),
8983 GlobalDirective("\t.globl\t"),
9084 SetDirective(0),
9185 LCOMMDirective(0),
144144 ConstantPoolSection = "\t.const\n";
145145 JumpTableDataSection = "\t.const\n";
146146 CStringSection = "\t.cstring";
147 FourByteConstantSection = "\t.literal4\n";
148 EightByteConstantSection = "\t.literal8\n";
149147 // FIXME: Why don't always use this section?
150148 if (is64Bit) {
151 SixteenByteConstantSection = "\t.literal16\n";
152 SixteenByteConstantSection_ = getUnnamedSection("\t.literal16\n",
153 SectionFlags::Mergeable);
149 SixteenByteConstantSection = getUnnamedSection("\t.literal16\n",
150 SectionFlags::Mergeable);
154151 }
155152 ReadOnlySection = "\t.const\n";
156153
232229 X86TargetAsmInfo(TM), ELFTargetAsmInfo(TM) {
233230
234231 ReadOnlySection = ".rodata";
235 FourByteConstantSection = "\t.section\t.rodata.cst4,\"aM\",@progbits,4";
236 EightByteConstantSection = "\t.section\t.rodata.cst8,\"aM\",@progbits,8";
237 SixteenByteConstantSection = "\t.section\t.rodata.cst16,\"aM\",@progbits,16";
238232 CStringSection = ".rodata.str";
239233 PrivateGlobalPrefix = ".L";
240234 WeakRefDirective = "\t.weak\t";