21 #ifdef LLVM_BUILD_GLOBAL_ISEL
37 #define DEBUG_TYPE "aarch64-subtarget"
39 #define GET_SUBTARGETINFO_CTOR
40 #define GET_SUBTARGETINFO_TARGET_DESC
41 #include "AArch64GenSubtargetInfo.inc"
54 cl::desc(
"Call nonlazybind functions via direct GOT load"),
58 AArch64Subtarget::initializeSubtargetDependencies(
StringRef FS,
62 if (CPUString.
empty())
63 CPUString =
"generic";
66 initializeProperties();
71 void AArch64Subtarget::initializeProperties() {
144 #ifdef LLVM_BUILD_GLOBAL_ISEL
148 std::unique_ptr<CallLowering> CallLoweringInfo;
149 std::unique_ptr<InstructionSelector> InstSelector;
150 std::unique_ptr<LegalizerInfo>
Legalizer;
151 std::unique_ptr<RegisterBankInfo> RegBankInfo;
154 return CallLoweringInfo.get();
158 return InstSelector.get();
166 return RegBankInfo.get();
174 const std::string &FS,
177 ReserveX18(TT.isOSDarwin() || TT.isOSWindows()),
178 IsLittle(LittleEndian), TargetTriple(TT), FrameLowering(),
179 InstrInfo(initializeSubtargetDependencies(FS, CPU)), TSInfo(),
180 TLInfo(TM, *this), GISel() {
181 #ifndef LLVM_BUILD_GLOBAL_ISEL
184 AArch64GISelActualAccessor *AArch64GISel =
new AArch64GISelActualAccessor();
185 AArch64GISel->CallLoweringInfo.reset(
195 *static_cast<const AArch64TargetMachine *>(&TM), *
this, *RBI));
197 AArch64GISel->RegBankInfo.reset(RBI);
203 assert(
GISel &&
"Access to GlobalISel APIs not set");
204 return GISel->getCallLowering();
208 assert(
GISel &&
"Access to GlobalISel APIs not set");
209 return GISel->getInstructionSelector();
213 assert(
GISel &&
"Access to GlobalISel APIs not set");
214 return GISel->getLegalizerInfo();
218 assert(
GISel &&
"Access to GlobalISel APIs not set");
219 return GISel->getRegBankInfo();
274 unsigned NumRegionInstrs)
const {
294 unsigned Major, Minor, Micro;
302 std::unique_ptr<PBQPRAConstraint>
304 return balanceFPOps() ? llvm::make_unique<A57ChainingConstraint>() :
nullptr;
uint16_t PrefetchDistance
The goal of this helper class is to gather the accessor to all the APIs related to GlobalISel...
const InstructionSelector * getInstructionSelector() const override
This class provides the information for the target register banks.
bool DisableLatencySchedHeuristic
const CallLowering * getCallLowering() const override
void overrideSchedPolicy(MachineSchedPolicy &Policy, unsigned NumRegionInstrs) const override
This file declares the targeting of the RegisterBankInfo class for AArch64.
Holds all the information related to register banks.
bool balanceFPOps() const
bool hasInternalLinkage() const
uint8_t VectorInsertExtractBaseCost
unsigned MinVectorRegisterBitWidth
MO_GOT - This flag indicates that a symbol operand represents the address of the GOT entry for the sy...
const AArch64RegisterInfo * getRegisterInfo() const override
This file declares the targeting of the Machinelegalizer class for AArch64.
bool enableEarlyIfConversion() const override
bool isiOS() const
Is this an iOS triple.
const AArch64TargetLowering * getTargetLowering() const override
initializer< Ty > init(const Ty &Val)
unsigned char classifyGlobalFunctionReference(const GlobalValue *GV, const TargetMachine &TM) const
CodeModel::Model getCodeModel() const
Returns the code model.
unsigned MaxPrefetchIterationsAhead
unsigned PrefLoopAlignment
bool isTargetMachO() const
void setGISelAccessor(GISelAccessor &GISel)
This object will take onwership of GISelAccessor.
unsigned PrefFunctionAlignment
void getiOSVersion(unsigned &Major, unsigned &Minor, unsigned &Micro) const
getiOSVersion - Parse the version number as with getOSVersion.
uint16_t MinPrefetchStride
bool shouldAssumeDSOLocal(const Module &M, const GlobalValue *GV) const
unsigned char ClassifyGlobalReference(const GlobalValue *GV, const TargetMachine &TM) const
ClassifyGlobalReference - Find the target operand flags that describe how a global value should be re...
Triple - Helper class for working with autoconf configuration names.
bool hasExternalWeakLinkage() const
void ParseSubtargetFeatures(StringRef CPU, StringRef FS)
ParseSubtargetFeatures - Parses features string setting specified subtarget options.
const char * getBZeroEntry() const
This function returns the name of a function which has an interface like the non-standard bzero funct...
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
static cl::opt< bool > UseAddressTopByteIgnored("aarch64-use-tbi", cl::desc("Assume that top byte of ""an address is ignored"), cl::init(false), cl::Hidden)
bool isTargetDarwin() const
Provides the logic to select generic machine instructions.
Define a generic scheduling policy for targets that don't provide their own MachineSchedStrategy.
This class provides the information for the target register banks.
std::unique_ptr< PBQPRAConstraint > getCustomPBQPConstraints() const override
AArch64Subtarget(const Triple &TT, const std::string &CPU, const std::string &FS, const TargetMachine &TM, bool LittleEndian)
This constructor initializes the data members to match that of the specified triple.
const LegalizerInfo * getLegalizerInfo() const override
static cl::opt< bool > UseNonLazyBind("aarch64-enable-nonlazybind", cl::desc("Call nonlazybind functions via direct GOT load"), cl::init(false), cl::Hidden)
InstructionSelector * createAArch64InstructionSelector(const AArch64TargetMachine &, AArch64Subtarget &, AArch64RegisterBankInfo &)
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
unsigned MaxJumpTableSize
This file describes how to lower LLVM calls to machine code calls.
bool supportsAddressTopByteIgnored() const
CPU has TBI (top byte of addresses is ignored during HW address translation) and OS enables it...
uint8_t MaxInterleaveFactor
Triple TargetTriple
TargetTriple - What processor and OS we're targeting.
ARMProcFamilyEnum ARMProcFamily
ARMProcFamily - ARM processor family: Cortex-A53, Cortex-A57, and others.
This file declares the IRTranslator pass.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool useSmallAddressing() const
Module * getParent()
Get the module that this global value is contained inside of...
const RegisterBankInfo * getRegBankInfo() const override
Primary interface to the complete machine description for the target machine.
StringRef - Represent a constant reference to a string, i.e.
bool DisableLatencyHeuristic
std::unique_ptr< GISelAccessor > GISel
Gather the accessor points to GlobalISel-related APIs.
static cl::opt< bool > EnableEarlyIfConvert("aarch64-early-ifcvt", cl::desc("Enable the early if ""converter pass"), cl::init(true), cl::Hidden)