43 : TheTarget(T),
DL(DataLayoutString), TargetTriple(TT), TargetCPU(CPU),
44 TargetFS(FS), CodeGenInfo(nullptr), AsmInfo(nullptr), MRI(nullptr),
45 MII(nullptr), STI(nullptr), RequireStructuredCFG(
false),
63 #define RESET_OPTION(X, Y) \
65 if (F.hasFnAttribute(Y)) \
66 Options.X = (F.getFnAttribute(Y).getValueAsString() == "true"); \
69 RESET_OPTION(LessPreciseFPMADOption,
"less-precise-fpmad");
119 if (isPIC && !isPIE) {
120 if (isLocal || isHidden)
125 if (!isDeclaration || isHidden)
133 if (SelectedModel > Model)
134 return SelectedModel;
173 bool MayAlwaysUsePrivate)
const {
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...
MCSectionMachO - This represents a section on a Mach-O system (used by Mac OS X). ...
CodeModel::Model getCodeModel() const
void getNameWithPrefix(SmallVectorImpl< char > &Name, const GlobalValue *GV, Mangler &Mang, bool MayAlwaysUsePrivate=false) const
Reloc::Model getRelocationModel() const
Returns the code generation relocation model.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
static TLSModel::Model getSelectedTLSModel(const GlobalValue *GV)
Get the IR-specified TLS model for Var.
Analysis pass providing the TargetTransformInfo.
virtual void getNameWithPrefix(SmallVectorImpl< char > &OutName, const GlobalValue *GV, bool CannotUsePrivateLabel, Mangler &Mang, const TargetMachine &TM) const
virtual bool isSectionAtomizableBySymbols(const MCSection &Section) const
True if the section is atomized using the symbols in it.
void setOptLevel(CodeGenOpt::Level Level) const
Overrides the optimization level.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
virtual TargetLoweringObjectFile * getObjFileLowering() const
#define RESET_OPTION(X, Y)
bool hasPrivateLinkage() const
const MCAsmInfo * AsmInfo
Contains target specific asm information.
const MCSubtargetInfo * STI
static bool canUsePrivateLabel(const MCAsmInfo &AsmInfo, const MCSection &Section)
Reloc::Model getRelocationModel() const
CodeGenOpt::Level getOptLevel() const
Returns the optimization level: None, Less, Default, or Aggressive.
MCContext & getContext() const
This class is intended to be used as a base class for asm properties and features specific to the tar...
CodeModel::Model getCodeModel() const
Returns the code model.
MCSection * SectionForGlobal(const GlobalValue *GV, SectionKind Kind, Mangler &Mang, const TargetMachine &TM) const
This method computes the appropriate section to emit the specified global variable or function defini...
bool hasHiddenVisibility() const
bool hasAttribute(unsigned Value) const
virtual TargetIRAnalysis getTargetIRAnalysis()
Get a TargetIRAnalysis appropriate for the target.
SectionKind - This is a simple POD value that classifies the properties of a section.
MCSymbol * getSymbol(const GlobalValue *GV, Mangler &Mang) const
Triple - Helper class for working with autoconf configuration names.
CodeGenOpt::Level getOptLevel() const
S_ATTR_NO_DEAD_STRIP - No dead stripping.
MCCodeGenInfo * CodeGenInfo
Low level target information such as relocation model.
Target - Wrapper for Target specific information.
const MCRegisterInfo * MRI
ThreadLocalMode getThreadLocalMode() const
const DataLayout & getDataLayout() const
Get the data layout for the module's target platform.
void setOptLevel(CodeGenOpt::Level Level)
MCSymbol * getOrCreateSymbol(const Twine &Name)
Lookup the symbol inside with the specified Name.
bool isDeclaration() const
Return true if the primary definition of this global value is outside of the current translation unit...
void getNameWithPrefix(raw_ostream &OS, const GlobalValue *GV, bool CannotUsePrivateLabel) const
Print the appropriate prefix and the specified global variable's name.
unsigned PositionIndependentExecutable
PositionIndependentExecutable - This flag indicates whether the code will eventually be linked into a...
void resetTargetOptions(const Function &F) const
Reset the target options based on the function's attributes.
bool hasLocalLinkage() const
TLSModel::Model getTLSModel(const GlobalValue *GV) const
Returns the TLS model which should be used for the given global variable.
Module * getParent()
Get the module that this global value is contained inside of...
StringRef - Represent a constant reference to a string, i.e.
This file describes how to lower LLVM code to machine code.