24 #define GET_SUBTARGETINFO_TARGET_DESC
25 #define GET_SUBTARGETINFO_CTOR
26 #include "ARMGenSubtargetInfo.inc"
32 cl::desc(
"Reserve R9, making it unavailable as GPR"));
52 "Generate unaligned accesses only on hardware/OS "
53 "combinations that are known to support them"),
55 "Disallow all unaligned memory accesses"),
57 "Allow unaligned memory accesses"),
70 "Generate IT block based on arch"),
72 "Disallow deprecated IT based on ARMv8"),
74 "Allow IT blocks based on ARMv7"),
80 , ARMProcFamily(Others)
86 , TargetABI(ARM_ABI_APCS) {
87 initializeEnvironment();
91 void ARMSubtarget::initializeEnvironment() {
151 initializeEnvironment();
172 ArchFS = ArchFS +
"," + FS.
str();
250 uint64_t
Bits = getFeatureBits();
251 if ((Bits & ARM::ProcA5 || Bits & ARM::ProcA8) &&
321 RegClassVector& CriticalPathRCs)
const {
OSType getOS() const
getOS - Get the parsed operating system type of this triple.
Triple TargetTriple
TargetTriple - What processor and OS we're targeting.
static cl::opt< bool > ArmUseMOVT("arm-use-movt", cl::init(true), cl::Hidden)
unsigned getMispredictionPenalty() const
unsigned MispredictPenalty
const MCSchedModel * SchedModel
SchedModel - Processor specific instruction costs.
bool endswith(StringRef Suffix) const
Check if this string ends with the given Suffix.
ValuesClass< DataType > END_WITH_NULL values(const char *Arg, DataType Val, const char *Desc,...)
bool hasAvailableExternallyLinkage() const
std::string str() const
str - Get the contents as an std::string.
const Function * getFunction() const
bool HasHardwareDivideInARM
HasHardwareDivideInARM - True if subtarget supports [su]div in ARM mode.
bool hasAttribute(AttrKind Val) const
Return true if the attribute is present.
bool hasCommonLinkage() const
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"), clEnumValEnd))
bool isTargetDarwin() const
This file contains the simple types necessary to represent the attributes associated with functions a...
bool HasThumb2
HasThumb2 - True if Thumb2 instructions are supported.
No attributes have been set.
bool UnsafeFPMath
Target machine allowed unsafe FP math (such as use of NEON fp)
const Triple & getTargetTriple() const
bool NoARM
NoARM - True if subtarget does not support ARM mode execution.
bool isMaterializable() const
virtual void resetSubtargetFeatures(const MachineFunction *MF)
Reset the features for the ARM target.
static bool isWeakForLinker(LinkageTypes Linkage)
bool AvoidMOVsShifterOperand
bool HasCRC
HasCRC - if true, processor supports CRC instructions.
initializer< Ty > init(const Ty &Val)
ARMSubtarget(const std::string &TT, const std::string &CPU, const std::string &FS, const TargetOptions &Options)
const std::string & getTriple() const
static cl::opt< bool > UseFusedMulOps("arm-use-mulops", cl::init(true), cl::Hidden)
bool hasHiddenVisibility() const
bool HasCrypto
HasCrypto - if true, processor supports Cryptography extensions.
enum llvm::ARMSubtarget::@174 TargetABI
std::string ParseARMTriple(StringRef TT, StringRef CPU)
bool HasTrustZone
HasTrustZone - if true, processor supports TrustZone security extensions.
bool InThumbMode
InThumbMode - True if compiling for Thumb, false for ARM.
bool isTargetNaCl() const
void ParseSubtargetFeatures(StringRef CPU, StringRef FS)
bool GVIsIndirectSymbol(const GlobalValue *GV, Reloc::Model RelocM) const
GVIsIndirectSymbol - true if the GV will be accessed via an indirect symbol.
bool enablePostRAScheduler(CodeGenOpt::Level OptLevel, TargetSubtargetInfo::AntiDepBreakMode &Mode, RegClassVector &CriticalPathRCs) const
enablePostRAScheduler - True at 'More' optimization.
bool UseNaClTrap
NaCl TRAP instruction is generated instead of the regular TRAP.
AttributeSet getAttributes() const
Return the attribute list for this Function.
const TargetOptions & Options
Options passed via command line that could influence the target.
static cl::opt< bool > ReserveR9("arm-reserve-r9", cl::Hidden, cl::desc("Reserve R9, making it unavailable as GPR"))
static cl::opt< AlignMode > Align(cl::desc("Load/store alignment support"), cl::Hidden, cl::init(DefaultAlign), cl::values(clEnumValN(DefaultAlign,"arm-default-align","Generate unaligned accesses only on hardware/OS ""combinations that are known to support them"), clEnumValN(StrictAlign,"arm-strict-align","Disallow all unaligned memory accesses"), clEnumValN(NoStrictAlign,"arm-no-strict-align","Allow unaligned memory accesses"), clEnumValEnd))
bool isOSVersionLT(unsigned Major, unsigned Minor=0, unsigned Micro=0) const
bool IsR9Reserved
IsR9Reserved - True if R9 is a not available as general purpose register.
#define clEnumValN(ENUMVAL, FLAGNAME, DESC)
bool isDeclaration() const
bool isTargetLinux() const
StringRef getArchName() const
InstrItineraryData InstrItins
Selected instruction itineraries (one entry per itinerary class.)
bool UseNEONForSinglePrecisionFP
bool PostRAScheduler
PostRAScheduler - True if using post-register-allocation scheduler.
bool hasLocalLinkage() const
Attribute getAttribute(unsigned Index, Attribute::AttrKind Kind) const
Return the attribute object that exists at the given index.
StringRef getValueAsString() const
Return the attribute's value as a string. This requires the attribute to be a string attribute...
bool SlowFPBrcc
SlowFPBrcc - True if floating point compare + branch is slow.
bool AvoidCPSRPartialUpdate
std::string CPUString
CPUString - String name of used CPU.
bool HasHardwareDivide
HasHardwareDivide - True if subtarget supports [su]div.
bool empty() const
empty - Check if the string is empty.