14 #ifndef LLVM_LIB_TARGET_ARM_ARMSUBTARGET_H 15 #define LLVM_LIB_TARGET_ARM_ARMSUBTARGET_H 36 #define GET_SUBTARGETINFO_HEADER 37 #include "ARMGenSubtargetInfo.inc" 41 class ARMBaseTargetMachine;
492 return InstrInfo.get();
500 return FrameLowering.get();
504 return &InstrInfo->getRegisterInfo();
515 std::unique_ptr<ARMFrameLowering> FrameLowering;
517 std::unique_ptr<ARMBaseInstrInfo> InstrInfo;
521 std::unique_ptr<CallLowering> CallLoweringInfo;
522 std::unique_ptr<InstructionSelector> InstSelector;
523 std::unique_ptr<LegalizerInfo>
Legalizer;
524 std::unique_ptr<RegisterBankInfo> RegBankInfo;
526 void initializeEnvironment();
825 #endif // LLVM_LIB_TARGET_ARM_ARMSUBTARGET_H
bool NoMovt
NoMovt - True if MOVT / MOVW pairs are not used for materialization of 32-bit imms (including global ...
bool isOSDarwin() const
isOSDarwin - Is this a "Darwin" OS (OS X, iOS, or watchOS).
bool UseNEONForFPMovs
If true, VMOVRS, VMOVSR and VMOVS will be converted from VFP to NEON.
bool isTargetGNUAEABI() const
unsigned stackAlignment
stackAlignment - The minimum alignment known to hold of the stack frame on entry to the function and ...
bool ExpandMLx
If true, run the MLx expansion pass.
Triple TargetTriple
TargetTriple - What processor and OS we're targeting.
bool checkVLDnAccessAlignment() const
bool enableMachineScheduler() const override
Returns true if machine scheduler should be enabled.
bool avoidCPSRPartialUpdate() const
bool HasBranchPredictor
HasBranchPredictor - True if the subtarget has a branch predictor.
This class represents lattice values for constants.
bool hasDivideInThumbMode() const
bool SplatVFPToNeon
If true, splat a register between VFP and NEON instructions.
bool SlowFPVMLx
SlowFPVMLx - If the VFP2 / NEON instructions are available, indicates whether the FP VML[AS] instruct...
bool SlowLoadDSubregister
If true, loading into a D subregister will be penalized.
const ARMSelectionDAGInfo * getSelectionDAGInfo() const override
bool isOSBinFormatELF() const
Tests whether the OS uses the ELF binary format.
bool useFastISel() const
True if fast-isel is used.
bool hasBranchPredictor() const
bool HasRetAddrStack
HasRetAddrStack - Some processors perform return stack prediction.
bool isTargetNaCl() const
const ARMTargetLowering * getTargetLowering() const override
bool HasFullFP16
HasFullFP16 - True if subtarget supports half-precision FP operations.
bool HasHardwareDivideInThumb
HasHardwareDivide - True if subtarget supports [su]div in Thumb mode.
bool HasSlowVDUP32
If true, VMOV will be favored over VDUP.
bool preferVMOVSR() const
bool isOSNaCl() const
Tests whether the OS is NaCl (Native Client)
bool prefers32BitThumb() const
bool isWatchOS() const
Is this an Apple watchOS triple.
bool isTargetCOFF() const
bool HasVFPv2
HasVFPv2, HasVFPv3, HasVFPv4, HasFPARMv8, HasNEON - Specify what floating point ISAs are supported...
bool UseAA
UseAA - True if using AA during codegen (DAGCombine, MISched, etc)
bool HasHardwareDivideInARM
HasHardwareDivideInARM - True if subtarget supports [su]div in ARM mode.
bool isThumb1Only() const
bool isTargetMuslAEABI() const
bool hasAcquireRelease() const
const LegalizerInfo * getLegalizerInfo() const override
bool avoidMOVsShifterOperand() const
const ARMBaseTargetMachine & TM
bool GenLongCalls
Generate calls via indirect call instructions.
bool isTargetHardFloat() const
bool isTargetNetBSD() const
bool SupportsTailCall
SupportsTailCall - True if the OS supports tail call.
bool hasSlowVDUP32() const
bool HasMuxedUnits
If true, the AGU and NEON/FPU units are multiplexed.
bool HasSlowVGETLNi32
If true, VMOV will be favored over VGETLNi32.
bool genExecuteOnly() const
unsigned getMaxInterleaveFactor() const
bool UseMulOps
UseMulOps - True if non-microcoded fused integer multiply-add and multiply-subtract instructions shou...
const ARMBaseInstrInfo * getInstrInfo() const override
bool hasV8MBaselineOps() const
Can load/store 1 register/cycle.
bool Has8MSecExt
Has8MSecExt - if true, processor supports ARMv8-M Security Extensions.
Holds all the information related to register banks.
bool HasRAS
HasRAS - if true, the processor supports RAS extensions.
bool SlowOddRegister
If true, a VLDM/VSTM starting with an odd register number is considered to take more microops than si...
bool HasZeroCycleZeroing
If true, the instructions "vmov.i32 d0, #0" and "vmov.i32 q0, #0" are particularly effective at zeroi...
bool StrictAlign
StrictAlign - If true, the subtarget disallows unaligned memory accesses for some types...
bool HasThumb2
HasThumb2 - True if Thumb2 instructions are supported.
bool HasFuseAES
HasFuseAES - if true, processor executes back to back AES instruction pairs faster.
bool UnsafeFPMath
Target machine allowed unsafe FP math (such as use of NEON fp)
bool useNEONForFPMovs() const
bool hasFuseLiterals() const
bool useStride4VFPs(const MachineFunction &MF) const
bool DontWidenVMOVS
If true, VMOVS will never be widened to VMOVD.
bool isGVIndirectSymbol(const GlobalValue *GV) const
True if the GV will be accessed via an indirect symbol.
bool PreferVMOVSR
If true, VMOVSR will be favored over VMOVDRR.
bool isReadTPHard() const
bool Pref32BitThumb
Pref32BitThumb - If true, codegen would prefer 32-bit Thumb instructions over 16-bit ones...
bool IsLittle
IsLittle - The target is Little Endian.
unsigned getMaxInlineSizeThreshold() const
getMaxInlineSizeThreshold - Returns the maximum memset / memcpy size that still makes it profitable t...
bool splitFramePushPop(const MachineFunction &MF) const
Returns true if the frame setup is split into two separate pushes (first r0-r7,lr then r8-r11)...
bool hasFullDataBarrier() const
bool useMovt(const MachineFunction &MF) const
ARMLdStMultipleTiming
What kind of timing do load multiple/store multiple instructions have.
bool enableAtomicExpand() const override
bool hasVirtualization() const
Can load/store 2 registers/cycle, but needs an extra cycle if the access is not 64-bit aligned...
bool hasMuxedUnits() const
bool DisableFramePointerElim(const MachineFunction &MF) const
DisableFramePointerElim - This returns true if frame pointer elimination optimization should be disab...
bool isXRaySupported() const override
bool isTargetEHABICompatible() const
bool NoARM
NoARM - True if subtarget does not support ARM mode execution.
bool HasFuseLiterals
HasFuseLiterals - if true, processor executes back to back bottom and top halves of literal generatio...
bool HasSB
Has speculation barrier.
bool useNEONForSinglePrecisionFP() const
unsigned getPartialUpdateClearance() const
bool isTargetDarwin() const
int PreISelOperandLatencyAdjustment
The adjustment that we need to apply to get the operand latency from the operand cycle returned by th...
bool HasAES
HasAES - if true, processor supports AES.
Itinerary data supplied by a subtarget to be used by a target.
bool isiOS() const
Is this an iOS triple.
bool NegativeImmediates
Implicitly convert an instruction to a different one if its immediates cannot be encoded.
bool useR7AsFramePointer() const
bool isR9Reserved() const
bool HasPerfMon
If true, the processor supports the Performance Monitor Extensions.
bool hasSlowVGETLNi32() const
bool hasDivideInARMMode() const
bool isTargetWatchABI() const
bool isOSWindows() const
Tests whether the OS is Windows.
bool AvoidMOVsShifterOperand
AvoidMOVsShifterOperand - If true, codegen should avoid using flag setting movs with shifter operand ...
bool HasCRC
HasCRC - if true, processor supports CRC instructions.
bool isProfitableToUnpredicate() const
bool HasDSP
HasDSP - If true, the subtarget supports the DSP (saturating arith and such) instructions.
bool HasV7Clrex
HasV7Clrex - True if the subtarget supports CLREX instructions.
bool preferISHSTBarriers() const
bool HasVirtualization
HasVirtualization - True if the subtarget supports the Virtualization extension.
unsigned getStackAlignment() const
getStackAlignment - Returns the minimum alignment known to hold of the stack frame on entry to the fu...
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 isOSBinFormatCOFF() const
Tests whether the OS uses the COFF binary format.
bool IsProfitableToUnpredicate
If true, if conversion may decide to leave some instructions unpredicated.
bool UseMISched
UseMISched - True if MachineScheduler should be used for this subtarget.
bool useMachineScheduler() const
bool HasV4TOps
HasV4TOps, HasV5TOps, HasV5TEOps, HasV6Ops, HasV6MOps, HasV6KOps, HasV6T2Ops, HasV7Ops, HasV8Ops - Specify whether target support specific ARM ISA variants.
bool HasVMLxForwarding
HasVMLxForwarding - If true, NEON has special multiplier accumulator forwarding to allow mul + mla be...
bool isTargetWatchOS() const
bool DisablePostRAScheduler
DisablePostRAScheduler - False if scheduling should happen again after register allocation.
bool HasVMLxHazards
If true, VFP/NEON VMLA/VMLS have special RAW hazards.
bool HasCrypto
HasCrypto - if true, processor supports Cryptography extensions.
bool isGVInGOT(const GlobalValue *GV) const
Returns the constant pool modifier needed to access the GV.
bool nonpipelinedVFP() const
bool hasSlowLoadDSubregister() const
unsigned getMispredictionPenalty() const
bool HasMPExtension
HasMPExtension - True if the subtarget supports Multiprocessing extension (ARMv7 only).
bool allowsUnalignedMem() const
bool hasTrustZone() const
const ARMFrameLowering * getFrameLowering() const override
bool hasSlowOddRegister() const
bool isOSBinFormatMachO() const
Tests whether the environment is MachO.
bool HasDotProd
HasDotProd - True if the ARMv8.2A dot product instructions are supported.
const CallLowering * getCallLowering() const override
bool NonpipelinedVFP
If true, VFP instructions are not pipelined.
ARMLdStMultipleTiming getLdStMultipleTiming() const
Triple - Helper class for working with autoconf configuration names.
bool useWideStrideVFP() const
bool HasFP16
HasFP16 - True if subtarget supports half-precision FP conversions.
bool HasTrustZone
HasTrustZone - if true, processor supports TrustZone security extensions.
bool InThumbMode
InThumbMode - True if compiling for Thumb, false for ARM.
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.
const std::string & getCPUString() const
void ParseSubtargetFeatures(StringRef CPU, StringRef FS)
ParseSubtargetFeatures - Parses features string setting specified subtarget options.
bool useSoftFloat() const
bool isTargetAEABI() const
bool isTargetLinux() const
const InstrItineraryData * getInstrItineraryData() const override
getInstrItins - Return the instruction itineraries based on subtarget selection.
bool isFPBrccSlow() const
const InstructionSelector * getInstructionSelector() const override
bool cheapPredicableCPSRDef() const
bool isTargetAndroid() const
ARMArchEnum ARMArch
ARMArch - ARM architecture.
bool allowPositionIndependentMovt() const
Allow movt+movw for PIC global address calculation.
bool hasMPExtension() const
bool isOSLinux() const
Tests whether the OS is Linux.
bool FPOnlySP
FPOnlySP - If true, the floating point unit only supports single precision.
ARMProcClassEnum ARMProcClass
ARMProcClass - ARM processor class: None, AClass, RClass or MClass.
EnvironmentType getEnvironment() const
getEnvironment - Get the parsed environment type of this triple.
bool UseWideStrideVFP
If true, use a wider stride when allocating VFP registers.
bool GenExecuteOnly
Generate code that does not contain data access to code sections.
bool UseNaClTrap
NaCl TRAP instruction is generated instead of the regular TRAP.
bool CheapPredicableCPSRDef
CheapPredicableCPSRDef - If true, disable +1 predication cost for instructions updating CPSR...
unsigned getPrefLoopAlignment() const
unsigned PrefLoopAlignment
What alignment is preferred for loop bodies, in log2(bytes).
MCSchedModel SchedModel
SchedModel - Processor specific instruction costs.
bool PreferISHST
If true, ISHST barriers will be used for Release semantics.
bool disablePostRAScheduler() const
const TargetOptions & Options
Options passed via command line that could influence the target.
bool genLongCalls() const
ARMSubtarget & initializeSubtargetDependencies(StringRef CPU, StringRef FS)
initializeSubtargetDependencies - Initializes using a CPU and feature string so that we can use initi...
bool UseSoftFloat
UseSoftFloat - True if we're using software floating point features.
unsigned getReturnOpcode() const
Returns the correct return opcode for the current feature set.
bool hasVMLxForwarding() const
Provides the logic to select generic machine instructions.
const Triple & getTargetTriple() const
bool hasZeroCycleZeroing() const
bool hasRetAddrStack() 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 useSplatVFPToNeon() const
unsigned PartialUpdateClearance
Clearance before partial register updates (in number of instructions)
int getPreISelOperandLatencyAdjustment() const
const LLVMTargetMachine & getTarget() const
getTarget - Return the target machine this machine code is compiled with
bool HasFP16FML
HasFP16FML - True if subtarget supports half-precision FP fml operations.
bool hasVMLxHazards() const
bool isTargetMachO() const
bool SlowFPBrcc
SlowFPBrcc - True if floating point compare + branch is slow.
ARMLdStMultipleTiming LdStMultipleTiming
What kind of timing do load multiple/store multiple have (double issue, single issue etc)...
bool HasD16
HasD16 - True if subtarget is limited to 16 double precision FP registers for VFPv3.
bool enablePostRAScheduler() const override
True for some subtargets at > -O0.
bool supportsTailCall() const
Can load/store 1 register/cycle, but needs an extra cycle for address computation and potentially als...
bool AvoidCPSRPartialUpdate
AvoidCPSRPartialUpdate - If true, codegen would avoid using instructions that partially update CPSR a...
This file describes how to lower LLVM calls to machine code calls.
bool isAndroid() const
Tests whether the target is Android.
bool hasV8MMainlineOps() const
Can load/store 2 registers/cycle.
bool isTargetWindows() const
bool HasFullDataBarrier
HasFullDataBarrier - True if the subtarget supports DFB data barrier instruction. ...
std::string CPUString
CPUString - String name of used CPU.
StringRef - Represent a constant reference to a string, i.e.
bool HasAcquireRelease
HasAcquireRelease - True if the subtarget supports v8 atomics (LDA/LDAEX etc) instructions.
bool hasFusion() const
Return true if the CPU supports any kind of instruction fusion.
bool hasAnyDataBarrier() const
bool useAA() const override
Enable use of alias analysis during code generation (during MI scheduling, DAGCombine, etc.).
bool HasFPAO
HasFPAO - if true, processor does positive address offset computation faster.
bool HasDataBarrier
HasDataBarrier - True if the subtarget supports DMB / DSB data barrier instructions.
bool hasDataBarrier() const
Machine model for scheduling, bundling, and heuristics.
const RegisterBankInfo * getRegBankInfo() const override
bool CheckVLDnAlign
If true, VLDn instructions take an extra cycle for unaligned accesses.
bool HasSHA2
HasSHA2 - if true, processor supports SHA1 and SHA256.
bool isAAPCS16_ABI() const
bool UseSjLjEH
UseSjLjEH - If true, the target uses SjLj exception handling (e.g. iOS).
bool dontWidenVMOVS() const
unsigned MaxInterleaveFactor