44 #define DEBUG_TYPE "arm-subtarget" 46 #define GET_SUBTARGETINFO_TARGET_DESC 47 #define GET_SUBTARGETINFO_CTOR 48 #include "ARMGenSubtargetInfo.inc" 64 "Generate IT block based on arch"),
66 "Disallow deprecated IT based on ARMv8"),
68 "Allow IT blocks based on ARMv7")));
80 initializeEnvironment();
81 initSubtargetFeatures(CPU, FS);
95 const std::string &FS,
99 TM(TM), FrameLowering(initializeFrameLowering(CPU, FS)),
118 *static_cast<const ARMBaseTargetMachine *>(&TM), *
this, *RBI));
120 RegBankInfo.reset(RBI);
124 return CallLoweringInfo.get();
128 return InstSelector.get();
136 return RegBankInfo.get();
144 void ARMSubtarget::initializeEnvironment() {
154 "inconsistent sjlj choice between CodeGen and MC");
164 if (AK == ARM::ArchKind::ARMV7S)
167 else if (AK == ARM::ArchKind::ARMV7K)
180 ArchFS = (
Twine(ArchFS) +
"," + FS).str();
248 if ((Bits[ARM::ProcA5] || Bits[ARM::ProcA8]) &&
bool NoMovt
NoMovt - True if MOVT / MOVW pairs are not used for materialization of 32-bit imms (including global ...
bool isDeclarationForLinker() const
unsigned MispredictPenalty
unsigned stackAlignment
stackAlignment - The minimum alignment known to hold of the stack frame on entry to the function and ...
Triple TargetTriple
TargetTriple - What processor and OS we're targeting.
bool enableMachineScheduler() const override
Returns true if machine scheduler should be enabled.
This class represents lattice values for constants.
unsigned EnableFastISel
EnableFastISel - This flag enables fast-path instruction selection which trades away generated code q...
bool useFastISel() const
True if fast-isel is used.
DWARF-like instruction based exceptions.
bool isTargetNaCl() const
const ARMTargetLowering * getTargetLowering() const override
This class provides the information for the target register banks.
enum llvm::ARMBaseTargetMachine::ARMABI TargetABI
bool isThumb1Only() const
const LegalizerInfo * getLegalizerInfo() const override
const ARMBaseTargetMachine & TM
bool isTargetHardFloat() const
InstructionSelector * createARMInstructionSelector(const ARMBaseTargetMachine &TM, const ARMSubtarget &STI, const ARMRegisterBankInfo &RBI)
bool SupportsTailCall
SupportsTailCall - True if the OS supports tail call.
bool genExecuteOnly() const
bool UseMulOps
UseMulOps - True if non-microcoded fused integer multiply-add and multiply-subtract instructions shou...
bool hasV8MBaselineOps() const
Holds all the information related to register banks.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
ExceptionHandling ExceptionModel
What exception model to use.
bool useStride4VFPs(const MachineFunction &MF) const
bool hasCommonLinkage() const
bool isGVIndirectSymbol(const GlobalValue *GV) const
True if the GV will be accessed via an indirect symbol.
bool IsLittle
IsLittle - The target is Little Endian.
bool useMovt(const MachineFunction &MF) const
bool enableAtomicExpand() const override
Can load/store 2 registers/cycle, but needs an extra cycle if the access is not 64-bit aligned...
bool isXRaySupported() const override
bool NoARM
NoARM - True if subtarget does not support ARM mode execution.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
This class provides the information for the target register banks.
bool isTargetDarwin() const
int PreISelOperandLatencyAdjustment
The adjustment that we need to apply to get the operand latency from the operand cycle returned by th...
Reloc::Model getRelocationModel() const
Returns the code generation relocation model.
bool isTargetWatchABI() const
initializer< Ty > init(const Ty &Val)
unsigned UnsafeFPMath
UnsafeFPMath - This flag is enabled when the -enable-unsafe-fp-math flag is specified on the command ...
Container class for subtarget features.
ARMProcFamilyEnum ARMProcFamily
ARMProcFamily - ARM processor family: Cortex-A8, Cortex-A9, and others.
bool RestrictIT
RestrictIT - If true, the subtarget disallows generation of deprecated IT blocks to conform to ARMv8 ...
bool shouldAssumeDSOLocal(const Module &M, const GlobalValue *GV) const
This file declares the targeting of the RegisterBankInfo class for ARM.
static cl::opt< bool > UseFusedMulOps("arm-use-mulops", cl::init(true), cl::Hidden)
ValuesClass values(OptsTy... Options)
Helper to build a ValuesClass by forwarding a variable number of arguments as an initializer list to ...
This file declares the targeting of the Machinelegalizer class for ARM.
bool useMachineScheduler() const
const MCAsmInfo * getMCAsmInfo() const
Return target specific asm information.
bool isGVInGOT(const GlobalValue *GV) const
Returns the constant pool modifier needed to access the GV.
unsigned getMispredictionPenalty() const
const CallLowering * getCallLowering() const override
Triple - Helper class for working with autoconf configuration names.
bool useWideStrideVFP() const
ARMSubtarget(const Triple &TT, const std::string &CPU, const std::string &FS, const ARMBaseTargetMachine &TM, bool IsLittle)
This constructor initializes the data members to match that of the specified triple.
StringRef getArchName() const
getArchName - Get the architecture (first) component of the triple.
void ParseSubtargetFeatures(StringRef CPU, StringRef FS)
ParseSubtargetFeatures - Parses features string setting specified subtarget options.
ArchKind parseArch(StringRef Arch)
bool isTargetLinux() const
const InstructionSelector * getInstructionSelector() const override
const Function & getFunction() const
Return the LLVM function that this machine code represents.
unsigned PrefLoopAlignment
What alignment is preferred for loop bodies, in log2(bytes).
MCSchedModel SchedModel
SchedModel - Processor specific instruction costs.
bool disablePostRAScheduler() const
const TargetOptions & Options
Options passed via command line that could influence the target.
bool isTargetHardFloat() const
ARMSubtarget & initializeSubtargetDependencies(StringRef CPU, StringRef FS)
initializeSubtargetDependencies - Initializes using a CPU and feature string so that we can use initi...
#define clEnumValN(ENUMVAL, FLAGNAME, DESC)
static cl::opt< ITMode > IT(cl::desc("IT block support"), cl::Hidden, cl::init(DefaultIT), cl::ZeroOrMore, cl::values(clEnumValN(DefaultIT, "arm-default-it", "Generate IT block based on arch"), clEnumValN(RestrictedIT, "arm-restrict-it", "Disallow deprecated IT based on ARMv8"), clEnumValN(NoRestrictedIT, "arm-no-restrict-it", "Allow IT blocks based on ARMv7")))
Provides the logic to select generic machine instructions.
const Triple & getTargetTriple() const
bool isPositionIndependent() const
bool ReserveR9
ReserveR9 - True if R9 is not available as a general purpose register.
InstrItineraryData InstrItins
Selected instruction itineraries (one entry per itinerary class.)
bool UseNEONForSinglePrecisionFP
UseNEONForSinglePrecisionFP - if the NEONFP attribute has been specified.
const ARMBaseRegisterInfo * getRegisterInfo() const override
bool optForMinSize() const
Optimize this function for minimum size (-Oz).
unsigned PartialUpdateClearance
Clearance before partial register updates (in number of instructions)
bool isTargetMachO() const
ARMLdStMultipleTiming LdStMultipleTiming
What kind of timing do load multiple/store multiple have (double issue, single issue etc)...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Module * getParent()
Get the module that this global value is contained inside of...
bool enablePostRAScheduler() const override
True for some subtargets at > -O0.
Can load/store 1 register/cycle, but needs an extra cycle for address computation and potentially als...
ExceptionHandling getExceptionHandlingType() const
std::string ParseARMTriple(const Triple &TT, StringRef CPU)
Can load/store 2 registers/cycle.
bool isTargetWindows() const
std::string CPUString
CPUString - String name of used CPU.
StringRef - Represent a constant reference to a string, i.e.
This file describes how to lower LLVM calls to machine code calls.
bool hasAnyDataBarrier() const
static cl::opt< bool > ForceFastISel("arm-force-fast-isel", cl::init(false), cl::Hidden)
ForceFastISel - Use the fast-isel, even for subtargets where it is not currently supported (for testi...
const RegisterBankInfo * getRegBankInfo() const override
bool isAAPCS16_ABI() const
bool UseSjLjEH
UseSjLjEH - If true, the target uses SjLj exception handling (e.g. iOS).
unsigned MaxInterleaveFactor