Go to the documentation of this file.
34 : TheTarget(
T),
DL(DataLayoutString), TargetTriple(TT),
36 MRI(nullptr), MII(nullptr), STI(nullptr), RequireStructuredCFG(
false),
54 #define RESET_OPTION(X, Y) \
56 Options.X = F.getFnAttribute(Y).getValueAsBool(); \
62 RESET_OPTION(NoSignedZerosFPMath,
"no-signed-zeros-fp-math");
112 if (TT.isOSBinFormatCOFF()) {
123 isa<GlobalVariable>(GV))
136 if (TT.isOSBinFormatGOFF())
139 if (TT.isOSBinFormatMachO()) {
145 assert(TT.isOSBinFormatELF() || TT.isOSBinFormatWasm() ||
146 TT.isOSBinFormatXCOFF());
165 if (IsSharedLibrary) {
179 if (SelectedModel >
Model)
180 return SelectedModel;
197 bool MayAlwaysUsePrivate)
const {
228 return {INT_MAX, INT_MAX};
229 std::pair<int, int>
Ret;
CodeGenOpt::Level getOptLevel() const
Returns the optimization level: None, Less, Default, or Aggressive.
Analysis pass providing the TargetTransformInfo.
This is an optimization pass for GlobalISel generic memory operations.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
bool useEmulatedTLS() const
Returns true if this target uses emulated TLS.
virtual void getNameWithPrefix(SmallVectorImpl< char > &OutName, const GlobalValue *GV, const TargetMachine &TM) const
Target - Wrapper for Target specific information.
#define RESET_OPTION(X, Y)
Triple - Helper class for working with autoconf configuration names.
static TLSModel::Model getSelectedTLSModel(const GlobalValue *GV)
Get the IR-specified TLS model for Var.
Reloc::Model getRelocationModel() const
Returns the code generation relocation model.
bool hasDefaultEmulatedTLS() const
Tests whether the target uses emulated TLS as default.
MCContext & getContext() const
virtual MCSymbol * getTargetSymbol(const GlobalValue *GV, const TargetMachine &TM) const
Targets that have a special convention for their symbols could use this hook to return a specialized ...
bool hasExternalWeakLinkage() const
MCSymbol * getOrCreateSymbol(const Twine &Name)
Lookup the symbol inside with the specified Name.
ThreadLocalMode getThreadLocalMode() const
static std::pair< int, int > parseBinutilsVersion(StringRef Version)
bool hasPrivateLinkage() const
void getNameWithPrefix(raw_ostream &OS, const GlobalValue *GV, bool CannotUsePrivateLabel) const
Print the appropriate prefix and the specified global variable's name.
const char LLVMTargetMachineRef LLVMPassBuilderOptionsRef Options
unsigned EmulatedTLS
EmulatedTLS - This flag enables emulated TLS model, using emutls function in the runtime library.
MCSymbol * getSymbol(const GlobalValue *GV) const
void resetTargetOptions(const Function &F) const
Reset the target options based on the function's attributes.
bool isPositionIndependent() const
Module * getParent()
Get the module that this global value is contained inside of...
CodeGenOpt::Level OptLevel
TargetIRAnalysis getTargetIRAnalysis() const
Get a TargetIRAnalysis appropriate for the target.
TLSModel::Model getTLSModel(const GlobalValue *GV) const
Returns the TLS model which should be used for the given global variable.
TargetMachine(const Target &T, StringRef DataLayoutString, const Triple &TargetTriple, StringRef CPU, StringRef FS, const TargetOptions &Options)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
virtual TargetLoweringObjectFile * getObjFileLowering() const
A Module instance is used to store all the information related to an LLVM module.
Mangler & getMangler() const
StringRef - Represent a constant reference to a string, i.e.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
bool shouldAssumeDSOLocal(const Module &M, const GlobalValue *GV) const
bool isStrongDefinitionForLinker() const
Returns true if this global's definition will be the one chosen by the linker.
unsigned const MachineRegisterInfo * MRI
void getNameWithPrefix(SmallVectorImpl< char > &Name, const GlobalValue *GV, Mangler &Mang, bool MayAlwaysUsePrivate=false) const
CodeModel::Model getCodeModel() const
Returns the code model.
PIELevel::Level getPIELevel() const
Returns the PIE level (small or large model)
const Triple & getTargetTriple() const
bool isDeclarationForLinker() const
bool hasDLLImportStorageClass() const
void setOptLevel(CodeGenOpt::Level Level)
Overrides the optimization level.
virtual TargetTransformInfo getTargetTransformInfo(const Function &F) const
Return a TargetTransformInfo for a given function.
unsigned ExplicitEmulatedTLS
Whether -emulated-tls or -no-emulated-tls is set.