Go to the documentation of this file.
33 return Size > 0 && Size <= SSThreshold;
51 if (Section ==
".sdata" || Section ==
".sbss")
78 return SmallBSSSection;
80 return SmallDataSection;
89 M.getModuleFlagsMetadata(ModuleFlags);
91 for (
const auto &MFE : ModuleFlags) {
93 if (
Key ==
"SmallDataLimit") {
94 SSThreshold = mdconst::extract<ConstantInt>(MFE.Val)->getZExtValue();
108 Align &Alignment)
const {
110 return SmallDataSection;
bool isSized(SmallPtrSetImpl< Type * > *Visited=nullptr) const
Return true if it makes sense to take the size of this type.
This is an optimization pass for GlobalISel generic memory operations.
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
bool hasCommonLinkage() const
A parsed version of the target data layout string in and methods for querying it.
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
bool hasExternalLinkage() const
Context object for machine code objects.
void getModuleMetadata(Module &M) override
Get the module-level metadata that the platform cares about.
void Initialize(MCContext &Ctx, const TargetMachine &TM) override
This method must be called before any actual lowering is done.
StringRef getSection() const
Get the custom section of this global if it has one.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
The instances of the Type class are immutable: once they are created, they are never changed.
bool isGlobalInSmallSection(const GlobalObject *GO, const TargetMachine &TM) const
Return true if this global address should be placed into small data/bss section.
MCContext & getContext() const
bool isDeclaration() const
Return true if the primary definition of this global value is outside of the current translation unit...
(vector float) vec_cmpeq(*A, *B) C
MCSectionELF * getELFSection(const Twine &Section, unsigned Type, unsigned Flags)
void getModuleMetadata(Module &M) override
Get the module-level metadata that the platform cares about.
This struct is a compact representation of a valid (non-zero power of two) alignment.
bool hasSection() const
Check if this global has a custom object file section.
This is an important base class in LLVM.
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
MCSection * getSectionForConstant(const DataLayout &DL, SectionKind Kind, const Constant *C, Align &Alignment) const override
Given a constant with the SectionKind, return a section that it should be placed in.
Module * getParent()
Get the module that this global value is contained inside of...
Primary interface to the complete machine description for the target machine.
A Module instance is used to store all the information related to an LLVM module.
MCSection * getSectionForConstant(const DataLayout &DL, SectionKind Kind, const Constant *C, Align &Alignment) const override
Given a constant with the SectionKind, return a section that it should be placed in.
StringRef - Represent a constant reference to a string, i.e.
Type * getType() const
All values are typed, get the type of this value.
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Instances of this class represent a uniqued identifier for a section in the current translation unit.
SectionKind - This is a simple POD value that classifies the properties of a section.
void Initialize(MCContext &Ctx, const TargetMachine &TM) override
This method must be called before any actual lowering is done.
const DataLayout & getDataLayout() const
Get the data layout for the module's target platform.
Type * getValueType() const
const char LLVMTargetMachineRef TM
bool isInSmallSection(uint64_t Size) const
bool isConstantInSmallSection(const DataLayout &DL, const Constant *CN) const
Return true if this constant should be placed into small data section.
TypeSize getTypeAllocSize(Type *Ty) const
Returns the offset in bytes between successive objects of the specified type, including alignment pad...