43 #define DEBUG_TYPE "subtarget" 45 #define GET_SUBTARGETINFO_TARGET_DESC 46 #define GET_SUBTARGETINFO_CTOR 47 #include "X86GenSubtargetInfo.inc" 53 cl::desc(
"Enable early if-conversion on X86"));
90 if (isa<Function>(GV))
132 if (CR->getUnsignedMax().ult(128))
176 "shouldAssumeDSOLocal gave inconsistent answer");
180 const Function *
F = dyn_cast_or_null<Function>(GV);
219 std::string CPUName = CPU;
225 std::string FullFS = FS;
228 FullFS =
"+64bit,+sse2," + FullFS;
230 FullFS =
"+64bit,+sse2";
236 FullFS =
"+sahf," + FullFS;
254 ToggleFeature(X86::Mode64Bit);
255 else if (In32BitMode)
256 ToggleFeature(X86::Mode32Bit);
257 else if (In16BitMode)
258 ToggleFeature(X86::Mode16Bit);
266 "64-bit code requested on a subtarget that doesn't support it!");
270 if (StackAlignOverride)
288 if (PreferVectorWidthOverride)
289 PreferVectorWidth = PreferVectorWidthOverride;
291 PreferVectorWidth = 256;
296 initSubtargetFeatures(CPU, FS);
302 unsigned StackAlignOverride,
303 unsigned PreferVectorWidthOverride,
304 unsigned RequiredVectorWidth)
307 StackAlignOverride(StackAlignOverride),
308 PreferVectorWidthOverride(PreferVectorWidthOverride),
309 RequiredVectorWidth(RequiredVectorWidth),
315 InstrInfo(initializeSubtargetDependencies(CPU, FS)), TLInfo(TM, *this),
bool isDeclarationForLinker() const
void ParseSubtargetFeatures(StringRef CPU, StringRef FS)
ParseSubtargetFeatures - Parses features string setting specified subtarget options.
bool is64Bit() const
Is this x86_64? (disregarding specific ABI / programming model)
const CallLowering * getCallLowering() const override
Methods used by Global ISel.
Compute iterated dominance frontiers using a linear time algorithm.
A Module instance is used to store all the information related to an LLVM module. ...
void setPICStyle(PICStyles::Style Style)
const LegalizerInfo * getLegalizerInfo() const override
static cl::opt< bool > X86EarlyIfConv("x86-early-ifcvt", cl::Hidden, cl::desc("Enable early if-conversion on X86"))
Optional< ConstantRange > getAbsoluteSymbolRange() const
If this is an absolute symbol reference, returns the range of the symbol, otherwise returns None...
bool hasFnAttribute(Attribute::AttrKind Kind) const
Return true if the function has the attribute.
bool hasDLLImportStorageClass() const
MO_GOTPCREL - On a symbol operand this indicates that the immediate is offset to the GOT entry for th...
unsigned char classifyLocalReference(const GlobalValue *GV) const
Classify a global variable reference for the current subtarget according to how we should reference i...
Holds all the information related to register banks.
MO_DARWIN_NONLAZY_PIC_BASE - On a symbol operand "FOO", this indicates that the reference is actually...
bool isTargetSolaris() const
This class provides the information for the target register banks.
const InstructionSelector * getInstructionSelector() const override
This file contains the simple types necessary to represent the attributes associated with functions a...
bool hasCommonLinkage() const
bool Prefer256Bit
Indicates target prefers 256 bit instructions.
std::unique_ptr< CallLowering > CallLoweringInfo
GlobalISel related APIs.
MO_GOT - On a symbol operand this indicates that the immediate is the offset to the GOT entry for the...
MO_ABS8 - On a symbol operand this indicates that the symbol is known to be an absolute symbol in ran...
Reloc::Model getRelocationModel() const
Returns the code generation relocation model.
X863DNowEnum X863DNowLevel
MMX, 3DNow, 3DNow Athlon, or none supported.
X86Subtarget(const Triple &TT, StringRef CPU, StringRef FS, const X86TargetMachine &TM, unsigned StackAlignOverride, unsigned PreferVectorWidthOverride, unsigned RequiredVectorWidth)
This constructor initializes the data members to match that of the specified triple.
MO_DARWIN_NONLAZY - On a symbol operand "FOO", this indicates that the reference is actually to the "...
const X86TargetLowering * getTargetLowering() const override
bool isTargetKFreeBSD() const
bool isLegalToCallImmediateAddr() const
Return true if the subtarget allows calls to immediate address.
bool shouldAssumeDSOLocal(const Module &M, const GlobalValue *GV) const
unsigned getStackAlignment() const
Returns the minimum alignment known to hold of the stack frame on entry to the function and which mus...
PICStyles::Style PICStyle
Which PIC style to use.
bool isPositionIndependent() const
bool enableEarlyIfConversion() const override
bool isTargetDarwin() const
bool IsUAMem16Slow
True if unaligned memory accesses of 16-bytes are slow.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Triple - Helper class for working with autoconf configuration names.
This file declares the targeting of the RegisterBankInfo class for X86.
const X86RegisterInfo * getRegisterInfo() const override
std::unique_ptr< InstructionSelector > InstSelector
bool HasX86_64
True if the processor supports X86-64 instructions.
CallingConv::ID getCallingConv() const
getCallingConv()/setCallingConv(CC) - These method get and set the calling convention of this functio...
Register calling convention used for parameters transfer optimization.
bool isTargetWin32() const
InstructionSelector * createX86InstructionSelector(const X86TargetMachine &TM, X86Subtarget &, X86RegisterBankInfo &)
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
CodeModel::Model getCodeModel() const
Returns the code model.
This file describes how to lower LLVM calls to machine code calls.
std::unique_ptr< RegisterBankInfo > RegBankInfo
bool getRtLibUseGOT() const
Returns true if PLT should be avoided for RTLib calls.
Provides the logic to select generic machine instructions.
MO_GOTOFF - On a symbol operand this indicates that the immediate is the offset to the location of th...
This class provides the information for the target register banks.
X86SSEEnum X86SSELevel
SSE1, SSE2, SSE3, SSSE3, SSE41, SSE42, or none supported.
bool isTargetCOFF() const
unsigned char classifyBlockAddressReference() const
Classify a blockaddress reference for the current subtarget according to how we should reference it i...
MO_PLT - On a symbol operand this indicates that the immediate is offset to the PLT entry of symbol n...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Module * getParent()
Get the module that this global value is contained inside of...
bool isTargetLinux() const
This file describes how to lower LLVM calls to machine code calls.
This file declares the targeting of the Machinelegalizer class for X86.
const RegisterBankInfo * getRegBankInfo() const override
unsigned char classifyGlobalFunctionReference(const GlobalValue *GV, const Module &M) const
Classify a global function reference for the current subtarget.
MO_PIC_BASE_OFFSET - On a symbol operand this indicates that the immediate should get the value of th...
StringRef - Represent a constant reference to a string, i.e.
unsigned char classifyGlobalReference(const GlobalValue *GV, const Module &M) const
unsigned stackAlignment
The minimum alignment known to hold of the stack frame on entry to the function and which must be mai...
bool hasFastGather() const
Triple TargetTriple
What processor and OS we're targeting.
MO_DLLIMPORT - On a symbol operand "FOO", this indicates that the reference is actually to the "__imp...