[llvm-commits] [llvm] r77138 - in /llvm/trunk: include/llvm/Target/DarwinTargetAsmInfo.h include/llvm/Target/ELFTargetAsmInfo.h include/llvm/Target/TargetAsmInfo.h lib/CodeGen/AsmPrinter/AsmPrinter.cpp lib/CodeGen/ELFWriter.cpp lib/Target/DarwinTargetAsmInfo.cpp lib/Target/ELFTargetAsmInfo.cpp lib/Target/TargetAsmInfo.cpp lib/Target/X86/X86TargetAsmInfo.cpp
Chris Lattner
sabre at nondot.org
Sat Jul 25 23:49:00 PDT 2009
Author: lattner
Date: Sun Jul 26 01:48:26 2009
New Revision: 77138
URL: http://llvm.org/viewvc/llvm-project?rev=77138&view=rev
Log:
rename Mergable -> Mergeable and Writable -> Writeable
Modified:
llvm/trunk/include/llvm/Target/DarwinTargetAsmInfo.h
llvm/trunk/include/llvm/Target/ELFTargetAsmInfo.h
llvm/trunk/include/llvm/Target/TargetAsmInfo.h
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/trunk/lib/CodeGen/ELFWriter.cpp
llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp
llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp
llvm/trunk/lib/Target/TargetAsmInfo.cpp
llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp
Modified: llvm/trunk/include/llvm/Target/DarwinTargetAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/DarwinTargetAsmInfo.h?rev=77138&r1=77137&r2=77138&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/DarwinTargetAsmInfo.h (original)
+++ llvm/trunk/include/llvm/Target/DarwinTargetAsmInfo.h Sun Jul 26 01:48:26 2009
@@ -40,7 +40,8 @@
Mangler *Mang) const;
- virtual const Section *getSectionForMergableConstant(SectionKind Kind)const;
+ virtual const Section *
+ getSectionForMergeableConstant(SectionKind Kind) const;
private:
const Section* MergeableStringSection(const GlobalVariable *GV) const;
Modified: llvm/trunk/include/llvm/Target/ELFTargetAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/ELFTargetAsmInfo.h?rev=77138&r1=77137&r2=77138&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/ELFTargetAsmInfo.h (original)
+++ llvm/trunk/include/llvm/Target/ELFTargetAsmInfo.h Sun Jul 26 01:48:26 2009
@@ -25,11 +25,11 @@
struct ELFTargetAsmInfo: public TargetAsmInfo {
explicit ELFTargetAsmInfo(const TargetMachine &TM);
- /// getSectionForMergableConstant - Given a mergable constant with the
+ /// getSectionForMergeableConstant - Given a mergeable constant with the
/// specified size and relocation information, return a section that it
/// should be placed in.
virtual const Section *
- getSectionForMergableConstant(SectionKind Kind) const;
+ getSectionForMergeableConstant(SectionKind Kind) const;
/// getFlagsForNamedSection - If this target wants to be able to infer
/// section flags based on the name of the section specified for a global
@@ -48,9 +48,9 @@
const Section *DataRelROSection;
const Section *DataRelROLocalSection;
- const Section *MergableConst4Section;
- const Section *MergableConst8Section;
- const Section *MergableConst16Section;
+ const Section *MergeableConst4Section;
+ const Section *MergeableConst8Section;
+ const Section *MergeableConst16Section;
private:
const Section *MergeableStringSection(const GlobalVariable *GV) const;
Modified: llvm/trunk/include/llvm/Target/TargetAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetAsmInfo.h?rev=77138&r1=77137&r2=77138&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetAsmInfo.h (original)
+++ llvm/trunk/include/llvm/Target/TargetAsmInfo.h Sun Jul 26 01:48:26 2009
@@ -45,38 +45,38 @@
/// ReadOnly - Data that is never written to at program runtime by the
/// program or the dynamic linker. Things in the top-level readonly
- /// SectionKind are not mergable.
+ /// SectionKind are not mergeable.
ReadOnly,
- /// MergableCString - This is a special section for nul-terminated
+ /// MergeableCString - This is a special section for nul-terminated
/// strings. The linker can unique the C strings, knowing their
/// semantics. Because it uniques based on the nul terminators, the
/// compiler can't put strings in this section that have embeded nuls
/// in them.
- MergableCString,
+ MergeableCString,
- /// MergableConst - These are sections for merging fixed-length
+ /// MergeableConst - These are sections for merging fixed-length
/// constants together. For example, this can be used to unique
/// constant pool entries etc.
- MergableConst,
+ MergeableConst,
- /// MergableConst4 - This is a section used by 4-byte constants,
+ /// MergeableConst4 - This is a section used by 4-byte constants,
/// for example, floats.
- MergableConst4,
+ MergeableConst4,
- /// MergableConst8 - This is a section used by 8-byte constants,
+ /// MergeableConst8 - This is a section used by 8-byte constants,
/// for example, doubles.
- MergableConst8,
+ MergeableConst8,
- /// MergableConst16 - This is a section used by 16-byte constants,
+ /// MergeableConst16 - This is a section used by 16-byte constants,
/// for example, vectors.
- MergableConst16,
+ MergeableConst16,
- /// Writable - This is the base of all segments that need to be written
+ /// Writeable - This is the base of all segments that need to be written
/// to during program runtime.
/// ThreadLocal - This is the base of all TLS segments. All TLS
- /// objects must be writable, otherwise there is no reason for them to
+ /// objects must be writeable, otherwise there is no reason for them to
/// be thread local!
/// ThreadBSS - Zero-initialized TLS data objects.
@@ -85,10 +85,10 @@
/// ThreadData - Initialized TLS data objects.
ThreadData,
- /// GlobalWritableData - Writable data that is global (not thread
+ /// GlobalWriteableData - Writeable data that is global (not thread
/// local).
- /// BSS - Zero initialized writable data.
+ /// BSS - Zero initialized writeable data.
BSS,
/// DataRel - This is the most general form of data that is written
@@ -96,54 +96,59 @@
/// globals.
DataRel,
- /// DataRelLocal - This is writable data that has a non-zero
+ /// DataRelLocal - This is writeable data that has a non-zero
/// initializer and has relocations in it, but all of the
/// relocations are known to be within the final linked image
/// the global is linked into.
DataRelLocal,
- /// DataNoRel - This is writable data that has a non-zero
+ /// DataNoRel - This is writeable data that has a non-zero
/// initializer, but whose initializer is known to have no
/// relocations.
DataNoRel,
/// ReadOnlyWithRel - These are global variables that are never
/// written to by the program, but that have relocations, so they
- /// must be stuck in a writable section so that the dynamic linker
+ /// must be stuck in a writeable section so that the dynamic linker
/// can write to them. If it chooses to, the dynamic linker can
/// mark the pages these globals end up on as read-only after it is
/// done with its relocation phase.
ReadOnlyWithRel,
/// ReadOnlyWithRelLocal - This is data that is readonly by the
- /// program, but must be writable so that the dynamic linker
+ /// program, but must be writeable so that the dynamic linker
/// can perform relocations in it. This is used when we know
/// that all the relocations are to globals in this final
/// linked image.
ReadOnlyWithRelLocal
- } K : 8; // This is private.
+ };
+
+ //private:
+ Kind K : 8; // This is private.
+
+ //public:
bool isText() const {
return K == Text;
}
bool isReadOnly() const {
- return K == ReadOnly || K == MergableCString || isMergableConst();
+ return K == ReadOnly || K == MergeableCString || isMergeableConst();
}
- bool isMergableCString() const { return K == MergableCString; }
- bool isMergableConst() const {
- return K == MergableConst || K == MergableConst4 ||
- K == MergableConst8 || K == MergableConst16;
+ bool isMergeableCString() const { return K == MergeableCString; }
+ bool isMergeableConst() const {
+ return K == MergeableConst || K == MergeableConst4 ||
+ K == MergeableConst8 || K == MergeableConst16;
}
- bool isMergableConst4() const { return K == MergableConst4; }
- bool isMergableConst8() const { return K == MergableConst8; }
- bool isMergableConst16() const { return K == MergableConst16; }
+ bool isMergeableConst4() const { return K == MergeableConst4; }
+ bool isMergeableConst8() const { return K == MergeableConst8; }
+ bool isMergeableConst16() const { return K == MergeableConst16; }
- bool isWritable() const {
- return isThreadLocal() || isGlobalWritableData();
+ bool isWriteable() const {
+ return isThreadLocal() || isGlobalWriteableData();
}
bool isThreadLocal() const {
@@ -153,7 +158,7 @@
bool isThreadBSS() const { return K == ThreadBSS; }
bool isThreadData() const { return K == ThreadData; }
- bool isGlobalWritableData() const {
+ bool isGlobalWriteableData() const {
return isBSS() || isDataRel() || isReadOnlyWithRel();
}
@@ -187,7 +192,7 @@
const unsigned Invalid = -1U;
const unsigned None = 0;
const unsigned Code = 1 << 0; ///< Section contains code
- const unsigned Writable = 1 << 1; ///< Section is writable
+ const unsigned Writable = 1 << 1; ///< Section is writeable
const unsigned BSS = 1 << 2; ///< Section contains only zeroes
const unsigned Mergeable = 1 << 3; ///< Section contains mergeable data
const unsigned Strings = 1 << 4; ///< Section contains C-type strings
@@ -690,10 +695,10 @@
bool Global) const;
- /// getSectionForMergableConstant - Given a mergable constant with the
+ /// getSectionForMergeableConstant - Given a Mergeable constant with the
/// specified size and relocation information, return a section that it
/// should be placed in.
- virtual const Section *getSectionForMergableConstant(SectionKind Kind)const;
+ virtual const Section *getSectionForMergeableConstant(SectionKind Kind)const;
/// getSectionPrefixForUniqueGlobal - Return a string that we should prepend
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=77138&r1=77137&r2=77138&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Sun Jul 26 01:48:26 2009
@@ -315,14 +315,14 @@
case 1: Kind = SectionKind::get(SectionKind::ReadOnlyWithRelLocal); break;
case 0:
switch (TM.getTargetData()->getTypeAllocSize(CPE.getType())) {
- case 4: Kind = SectionKind::get(SectionKind::MergableConst4); break;
- case 8: Kind = SectionKind::get(SectionKind::MergableConst8); break;
- case 16: Kind = SectionKind::get(SectionKind::MergableConst16); break;
- default: Kind = SectionKind::get(SectionKind::MergableConst); break;
+ case 4: Kind = SectionKind::get(SectionKind::MergeableConst4); break;
+ case 8: Kind = SectionKind::get(SectionKind::MergeableConst8); break;
+ case 16: Kind = SectionKind::get(SectionKind::MergeableConst16); break;
+ default: Kind = SectionKind::get(SectionKind::MergeableConst); break;
}
}
- const Section *S = TAI->getSectionForMergableConstant(Kind);
+ const Section *S = TAI->getSectionForMergeableConstant(Kind);
// The number of sections are small, just do a linear search from the
// last section to the first.
Modified: llvm/trunk/lib/CodeGen/ELFWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ELFWriter.cpp?rev=77138&r1=77137&r2=77138&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ELFWriter.cpp (original)
+++ llvm/trunk/lib/CodeGen/ELFWriter.cpp Sun Jul 26 01:48:26 2009
@@ -161,15 +161,14 @@
case 1: Kind = SectionKind::get(SectionKind::ReadOnlyWithRelLocal); break;
case 0:
switch (TM.getTargetData()->getTypeAllocSize(CPE.getType())) {
- case 4: Kind = SectionKind::get(SectionKind::MergableConst4); break;
- case 8: Kind = SectionKind::get(SectionKind::MergableConst8); break;
- case 16: Kind = SectionKind::get(SectionKind::MergableConst16); break;
- default: Kind = SectionKind::get(SectionKind::MergableConst); break;
+ case 4: Kind = SectionKind::get(SectionKind::MergeableConst4); break;
+ case 8: Kind = SectionKind::get(SectionKind::MergeableConst8); break;
+ case 16: Kind = SectionKind::get(SectionKind::MergeableConst16); break;
+ default: Kind = SectionKind::get(SectionKind::MergeableConst); break;
}
}
- std::string CstPoolName = TAI->getSectionForMergableConstant(Kind)->getName();
- return getSection(CstPoolName,
+ return getSection(TAI->getSectionForMergeableConstant(Kind)->getName(),
ELFSection::SHT_PROGBITS,
ELFSection::SHF_MERGE | ELFSection::SHF_ALLOC,
CPE.getAlignment());
Modified: llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp?rev=77138&r1=77137&r2=77138&view=diff
==============================================================================
--- llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/DarwinTargetAsmInfo.cpp Sun Jul 26 01:48:26 2009
@@ -144,21 +144,21 @@
}
// FIXME: Alignment check should be handled by section classifier.
- if (Kind.isMergableCString())
+ if (Kind.isMergeableCString())
return MergeableStringSection(cast<GlobalVariable>(GV));
- if (Kind.isMergableConst()) {
- if (Kind.isMergableConst4())
+ if (Kind.isMergeableConst()) {
+ if (Kind.isMergeableConst4())
return FourByteConstantSection;
- if (Kind.isMergableConst8())
+ if (Kind.isMergeableConst8())
return EightByteConstantSection;
- if (Kind.isMergableConst16() && SixteenByteConstantSection)
+ if (Kind.isMergeableConst16() && SixteenByteConstantSection)
return SixteenByteConstantSection;
return ReadOnlySection; // .const
}
// FIXME: ROData -> const in -static mode that is relocatable but they happen
- // by the static linker. Why not mergable?
+ // by the static linker. Why not mergeable?
if (Kind.isReadOnly())
return getReadOnlySection();
@@ -188,17 +188,17 @@
}
const Section *
-DarwinTargetAsmInfo::getSectionForMergableConstant(SectionKind Kind) const {
+DarwinTargetAsmInfo::getSectionForMergeableConstant(SectionKind Kind) const {
// If this constant requires a relocation, we have to put it in the data
// segment, not in the text segment.
if (Kind.isDataRel())
return ConstDataSection;
- if (Kind.isMergableConst4())
+ if (Kind.isMergeableConst4())
return FourByteConstantSection;
- if (Kind.isMergableConst8())
+ if (Kind.isMergeableConst8())
return EightByteConstantSection;
- if (Kind.isMergableConst16() && SixteenByteConstantSection)
+ if (Kind.isMergeableConst16() && SixteenByteConstantSection)
return SixteenByteConstantSection;
return ReadOnlySection; // .const
}
Modified: llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp?rev=77138&r1=77137&r2=77138&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/ELFTargetAsmInfo.cpp Sun Jul 26 01:48:26 2009
@@ -44,11 +44,11 @@
DataRelROLocalSection = getNamedSection("\t.data.rel.ro.local",
SectionFlags::Writable);
- MergableConst4Section = getNamedSection(".rodata.cst4",
+ MergeableConst4Section = getNamedSection(".rodata.cst4",
SectionFlags::setEntitySize(SectionFlags::Mergeable, 4));
- MergableConst8Section = getNamedSection(".rodata.cst8",
+ MergeableConst8Section = getNamedSection(".rodata.cst8",
SectionFlags::setEntitySize(SectionFlags::Mergeable, 8));
- MergableConst16Section = getNamedSection(".rodata.cst16",
+ MergeableConst16Section = getNamedSection(".rodata.cst16",
SectionFlags::setEntitySize(SectionFlags::Mergeable, 16));
}
@@ -57,16 +57,16 @@
ELFTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV,
SectionKind Kind) const {
if (Kind.isText()) return TextSection;
- if (Kind.isMergableCString())
+ if (Kind.isMergeableCString())
return MergeableStringSection(cast<GlobalVariable>(GV));
- if (Kind.isMergableConst()) {
- if (Kind.isMergableConst4())
- return MergableConst4Section;
- if (Kind.isMergableConst8())
- return MergableConst8Section;
- if (Kind.isMergableConst16())
- return MergableConst16Section;
+ if (Kind.isMergeableConst()) {
+ if (Kind.isMergeableConst4())
+ return MergeableConst4Section;
+ if (Kind.isMergeableConst8())
+ return MergeableConst8Section;
+ if (Kind.isMergeableConst16())
+ return MergeableConst16Section;
return ReadOnlySection; // .const
}
@@ -88,11 +88,11 @@
return DataRelROSection;
}
-/// getSectionForMergableConstant - Given a mergable constant with the
+/// getSectionForMergeableConstant - Given a Mergeable constant with the
/// specified size and relocation information, return a section that it
/// should be placed in.
const Section *
-ELFTargetAsmInfo::getSectionForMergableConstant(SectionKind Kind) const {
+ELFTargetAsmInfo::getSectionForMergeableConstant(SectionKind Kind) const {
return SelectSectionForGlobal(0, Kind);
}
Modified: llvm/trunk/lib/Target/TargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetAsmInfo.cpp?rev=77138&r1=77137&r2=77138&view=diff
==============================================================================
--- llvm/trunk/lib/Target/TargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/TargetAsmInfo.cpp Sun Jul 26 01:48:26 2009
@@ -211,7 +211,7 @@
Flags |= SectionFlags::TLS;
if (Kind.isText())
Flags |= SectionFlags::Code;
- if (Kind.isWritable())
+ if (Kind.isWriteable())
Flags |= SectionFlags::Writable;
return Flags;
@@ -252,16 +252,16 @@
// If initializer is a null-terminated string, put it in a "cstring"
// section if the target has it.
if (isConstantString(C))
- return SectionKind::get(SectionKind::MergableCString);
+ return SectionKind::get(SectionKind::MergeableCString);
// Otherwise, just drop it into a mergable constant section. If we have
// a section for this size, use it, otherwise use the arbitrary sized
// mergable section.
switch (TM.getTargetData()->getTypeAllocSize(C->getType())) {
- case 4: return SectionKind::get(SectionKind::MergableConst4);
- case 8: return SectionKind::get(SectionKind::MergableConst8);
- case 16: return SectionKind::get(SectionKind::MergableConst16);
- default: return SectionKind::get(SectionKind::MergableConst);
+ case 4: return SectionKind::get(SectionKind::MergeableConst4);
+ case 8: return SectionKind::get(SectionKind::MergeableConst8);
+ case 16: return SectionKind::get(SectionKind::MergeableConst16);
+ default: return SectionKind::get(SectionKind::MergeableConst);
}
case Constant::LocalRelocation:
@@ -377,7 +377,7 @@
/// specified size and relocation information, return a section that it
/// should be placed in.
const Section *
-TargetAsmInfo::getSectionForMergableConstant(SectionKind Kind) const {
+TargetAsmInfo::getSectionForMergeableConstant(SectionKind Kind) const {
if (Kind.isReadOnly())
if (const Section *S = getReadOnlySection())
return S;
Modified: llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp?rev=77138&r1=77137&r2=77138&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp Sun Jul 26 01:48:26 2009
@@ -269,7 +269,7 @@
getSectionPrefixForUniqueGlobal(SectionKind Kind) const {
if (Kind.isText())
return ".text$linkonce";
- if (Kind.isWritable())
+ if (Kind.isWriteable())
return ".data$linkonce";
return ".rdata$linkonce";
}
More information about the llvm-commits
mailing list