25 cl::desc(
"Small data and bss section threshold size (default=8)"),
30 cl::desc(
"MIPS: Use gp_rel for object-local data."),
35 cl::desc(
"MIPS: Use gp_rel for data that is not defined by the "
122 return SmallBSSSection;
124 return SmallDataSection;
133 return (static_cast<const MipsTargetMachine &>(TM)
135 ->useSmallSection() &&
144 return SmallDataSection;
Instances of this class represent a uniqued identifier for a section in the current translation unit...
static SectionKind getKindForGlobal(const GlobalValue *GV, const TargetMachine &TM)
Classify the specified global variable into a set of target independent categories embodied in Sectio...
MCSection * getSectionForConstant(SectionKind Kind, const Constant *C) const override
Given a constant with the SectionKind, return a section that it should be placed in.
MCSectionELF * getELFSection(StringRef Section, unsigned Type, unsigned Flags)
static bool IsInSmallSection(uint64_t Size)
bool hasAvailableExternallyLinkage() const
MCSection * getSectionForConstant(SectionKind Kind, const Constant *C) const override
Given a constant with the SectionKind, return a section that it should be placed in.
MCSection * SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, Mangler &Mang, const TargetMachine &TM) const override
static cl::opt< bool > ExternSData("mextern-sdata", cl::Hidden, cl::desc("MIPS: Use gp_rel for data that is not defined by the ""current object."), cl::init(true))
bool hasCommonLinkage() const
virtual void Initialize(MCContext &ctx, const TargetMachine &TM)
This method must be called before any actual lowering is done.
Context object for machine code objects.
bool IsConstantInSmallSection(const Constant *CN, const TargetMachine &TM) const
Return true if this constant should be placed into small data section.
MCContext & getContext() const
static cl::opt< bool > LocalSData("mlocal-sdata", cl::Hidden, cl::desc("MIPS: Use gp_rel for object-local data."), cl::init(true))
Type * getElementType() const
initializer< Ty > init(const Ty &Val)
MCSection * SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, Mangler &Mang, const TargetMachine &TM) const override
void Initialize(MCContext &Ctx, const TargetMachine &TM) override
This method must be called before any actual lowering is done.
The instances of the Type class are immutable: once they are created, they are never changed...
This is an important base class in LLVM.
bool IsGlobalInSmallSectionImpl(const GlobalValue *GV, const TargetMachine &TM) const
Return true if this global address should be placed into small data/bss section.
void InitializeELF(bool UseInitArray_)
SectionKind - This is a simple POD value that classifies the properties of a section.
bool hasExternalLinkage() const
unsigned UseInitArray
UseInitArray - Use .init_array instead of .ctors for static constructors.
uint64_t getTypeAllocSize(Type *Ty) const
Returns the offset in bytes between successive objects of the specified type, including alignment pad...
const DataLayout * getDataLayout() const
Deprecated in 3.7, will be removed in 3.8.
Type * getType() const
All values are typed, get the type of this value.
LLVM_ATTRIBUTE_UNUSED_RESULT std::enable_if< !is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
PointerType * getType() const
Global values are always pointers.
bool isDeclaration() const
Return true if the primary definition of this global value is outside of the current translation unit...
static cl::opt< unsigned > SSThreshold("mips-ssection-threshold", cl::Hidden, cl::desc("Small data and bss section threshold size (default=8)"), cl::init(8))
bool IsGlobalInSmallSection(const GlobalValue *GV, const TargetMachine &TM, SectionKind Kind) const
Return true if this global address should be placed into small data/bss section.
bool hasLocalLinkage() const
const ARM::ArchExtKind Kind
bool useSmallSection() const
Primary interface to the complete machine description for the target machine.