LLVM 24.0.0git
AArch64Subtarget.cpp
Go to the documentation of this file.
1//===-- AArch64Subtarget.cpp - AArch64 Subtarget Information ----*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file implements the AArch64 specific subclass of TargetSubtarget.
10//
11//===----------------------------------------------------------------------===//
12
13#include "AArch64Subtarget.h"
14
15#include "AArch64.h"
16#include "AArch64InstrInfo.h"
17#include "AArch64PBQPRegAlloc.h"
26#include "llvm/IR/GlobalValue.h"
30
31using namespace llvm;
32
33#define DEBUG_TYPE "aarch64-subtarget"
34
35#define GET_SUBTARGETINFO_CTOR
36#define GET_SUBTARGETINFO_TARGET_DESC
37#include "AArch64GenSubtargetInfo.inc"
38
39#define OPTIONS_STRUCT_DEFS
40#include "AArch64Options.inc"
41
42// Reserve a list of X# registers, so they are unavailable for register
43// allocator, but can still be used as ABI requests, such as passing arguments
44// to function call.
46ReservedRegsForRA("reserve-regs-for-regalloc", cl::desc("Reserve physical "
47 "registers, so they can't be used by register allocator. "
48 "Should only be used for testing register allocator."),
50
52 return CLOpts.insert_extract_base_cost.value_or(VectorInsertExtractBaseCost);
53}
54
55AArch64Subtarget &AArch64Subtarget::initializeSubtargetDependencies(
56 StringRef FS, StringRef CPUString, StringRef TuneCPUString,
57 bool HasMinSize) {
58 // Determine default and user-specified characteristics
59
60 if (CPUString.empty())
61 CPUString = "generic";
62
63 if (TuneCPUString.empty())
64 TuneCPUString = CPUString;
65
66 ParseSubtargetFeatures(CPUString, TuneCPUString, FS);
67 initializeProperties(HasMinSize);
68
69 return *this;
70}
71
72void AArch64Subtarget::initializeProperties(bool HasMinSize) {
73 // Initialize CPU specific properties. We should add a tablegen feature for
74 // this in the future so we can specify it together with the subtarget
75 // features.
76 switch (ARMProcFamily) {
77 case Generic:
78 // Using TuneCPU=generic we avoid ldapur instructions to line up with the
79 // cpus that use the AvoidLDAPUR feature. We don't want this to be on
80 // forever, so it is enabled between armv8.4 and armv8.7/armv9.2.
81 if (hasV8_4aOps() && !hasV8_8aOps())
82 AvoidLDAPUR = true;
83 break;
84 case Carmel:
85 break;
86 case CortexA35:
87 case CortexA53:
88 case CortexA55:
89 case CortexR82:
90 case CortexR82AE:
94 break;
95 case CortexA57:
99 break;
100 case CortexA65:
102 break;
103 case CortexA72:
104 case CortexA73:
105 case CortexA75:
109 break;
110 case CortexA76:
111 case CortexA77:
112 case CortexA78:
113 case CortexA78AE:
114 case CortexA78C:
115 case CortexX1:
119 break;
120 case CortexA320:
121 case CortexA510:
122 case CortexA520:
123 case C1Nano:
125 VScaleForTuning = 1;
128 break;
129 case CortexA710:
130 case CortexA715:
131 case CortexA720:
132 case CortexA725:
133 case C1Pro:
134 case CortexX2:
135 case CortexX3:
136 case CortexX4:
137 case CortexX925:
138 case C1Premium:
139 case C1Ultra:
140 case C2Ultra:
142 VScaleForTuning = 1;
145 break;
146 case A64FX:
147 CacheLineSize = 256;
150 PrefetchDistance = 128;
151 MinPrefetchStride = 1024;
153 VScaleForTuning = 4;
154 break;
155 case MONAKA:
156 VScaleForTuning = 2;
157 break;
158 case AppleA7:
159 case AppleA10:
160 case AppleA11:
161 case AppleA12:
162 case AppleA13:
163 case AppleA14:
164 case AppleA15:
165 case AppleA16:
166 case AppleA17:
167 case AppleM4:
168 case AppleM5:
169 PrefetchDistance = 280;
170 MinPrefetchStride = 2048;
172 break;
173 case ExynosM3:
174 MaxJumpTableSize = 20;
177 break;
178 case Falkor:
179 // FIXME: remove this to enable 64-bit SLP if performance looks good.
181 CacheLineSize = 128;
182 PrefetchDistance = 820;
183 MinPrefetchStride = 2048;
185 break;
186 case Kryo:
188 CacheLineSize = 128;
189 PrefetchDistance = 740;
190 MinPrefetchStride = 1024;
192 // FIXME: remove this to enable 64-bit SLP if performance looks good.
194 break;
195 case NeoverseE1:
197 break;
198 case NeoverseN1:
202 break;
203 case NeoverseV2:
204 case NeoverseV3:
206 ScatterOverhead = 13;
207 [[fallthrough]];
208 case NeoverseN2:
209 case NeoverseN3:
210 case NeoverseV3AE:
214 VScaleForTuning = 1;
215 break;
216 case NeoverseV1:
220 VScaleForTuning = 2;
222 break;
223 case Neoverse512TVB:
225 VScaleForTuning = 1;
226 break;
227 case Saphira:
228 // FIXME: remove this to enable 64-bit SLP if performance looks good.
230 break;
231 case ThunderX2T99:
234 PrefetchDistance = 128;
235 MinPrefetchStride = 1024;
237 // FIXME: remove this to enable 64-bit SLP if performance looks good.
239 break;
240 case ThunderX:
241 case ThunderXT88:
242 case ThunderXT81:
243 case ThunderXT83:
244 CacheLineSize = 128;
247 // FIXME: remove this to enable 64-bit SLP if performance looks good.
249 break;
250 case TSV110:
253 break;
254 case HIP12:
257 VScaleForTuning = 2;
259 break;
260 case ThunderX3T110:
263 PrefetchDistance = 128;
264 MinPrefetchStride = 1024;
266 // FIXME: remove this to enable 64-bit SLP if performance looks good.
268 break;
269 case Ampere1:
270 case Ampere1A:
271 case Ampere1B:
272 case Ampere1C:
275 break;
276 case Oryon:
278 PrefetchDistance = 128;
279 MinPrefetchStride = 1024;
280 break;
281 case Olympus:
283 ScatterOverhead = 13;
287 VScaleForTuning = 1;
288 break;
289 }
290
291 if (CLOpts.min_jump_table_entries || !HasMinSize)
292 MinimumJumpTableEntries = CLOpts.min_jump_table_entries.value_or(10);
293 if (CLOpts.sve_vscale_for_tuning)
294 VScaleForTuning = *CLOpts.sve_vscale_for_tuning;
295}
296
298 StringRef TuneCPU, StringRef FS,
299 const TargetMachine &TM, bool LittleEndian,
300 unsigned MinSVEVectorSizeInBitsOverride,
301 unsigned MaxSVEVectorSizeInBitsOverride,
303 bool HasMinSize,
305 : AArch64GenSubtargetInfo(TT, CPU, TuneCPU, FS),
306 CLOpts(static_cast<const AArch64TargetMachine &>(TM).getCLOpts()),
307 ReserveXRegister(AArch64::GPR64commonRegClass.getNumRegs()),
308 ReserveXRegisterForRA(AArch64::GPR64commonRegClass.getNumRegs()),
309 CustomCallSavedXRegs(AArch64::GPR64commonRegClass.getNumRegs()),
310 IsLittle(LittleEndian), IsStreaming(IsStreaming),
312 MinSVEVectorSizeInBits(MinSVEVectorSizeInBitsOverride),
313 MaxSVEVectorSizeInBits(MaxSVEVectorSizeInBitsOverride),
315 // To benefit from SME2's strided-register multi-vector load/store
316 // instructions we'll need to enable subreg liveness. Our longer
317 // term aim is to make this the default, regardless of streaming
318 // mode, but there are still some outstanding issues, see:
319 // https://github.com/llvm/llvm-project/pull/174188
320 // and:
321 // https://github.com/llvm/llvm-project/pull/168353
323 CLOpts.enable_subreg_liveness_tracking),
324 TargetTriple(TT),
325 InstrInfo(initializeSubtargetDependencies(FS, CPU, TuneCPU, HasMinSize)),
326 TLInfo(TM, *this) {
328 ReserveXRegister.set(18);
329
332 Legalizer.reset(new AArch64LegalizerInfo(*this));
333
334 auto *RBI = new AArch64RegisterBankInfo(*getRegisterInfo());
335
336 // FIXME: At this point, we can't rely on Subtarget having RBI.
337 // It's awkward to mix passing RBI and the Subtarget; should we pass
338 // TII/TRI as well?
340 *static_cast<const AArch64TargetMachine *>(&TM), *this, *RBI));
341
342 RegBankInfo.reset(RBI);
343
344 auto TRI = getRegisterInfo();
346 for (unsigned i = 0; i < 29; ++i) {
347 if (ReservedRegNames.count(TRI->getName(AArch64::X0 + i)))
349 }
350 // X30 is named LR, so we can't use TRI->getName to check X30.
351 if (ReservedRegNames.count("X30") || ReservedRegNames.count("LR"))
352 ReserveXRegisterForRA.set(30);
353 // X29 is named FP, so we can't use TRI->getName to check X29.
354 if (ReservedRegNames.count("X29") || ReservedRegNames.count("FP"))
355 ReserveXRegisterForRA.set(29);
356}
357
361
365
369
371 return Legalizer.get();
372}
373
375 return RegBankInfo.get();
376}
377
378/// Find the target operand flags that describe how a global value should be
379/// referenced for the current subtarget.
380unsigned
382 const TargetMachine &TM) const {
383 // MachO large model always goes via a GOT, simply to get a single 8-byte
384 // absolute relocation on all global addresses.
386 return AArch64II::MO_GOT;
387
388 // All globals dynamically protected by MTE must have their address tags
389 // synthesized. This is done by having the loader stash the tag in the GOT
390 // entry. Force all tagged globals (even ones with internal linkage) through
391 // the GOT.
392 if (GV->isTagged())
393 return AArch64II::MO_GOT;
394
395 if (!TM.shouldAssumeDSOLocal(GV)) {
396 if (GV->hasDLLImportStorageClass()) {
398 }
399 if (getTargetTriple().isOSWindows())
401 return AArch64II::MO_GOT;
402 }
403
404 // The small code model's direct accesses use ADRP, which cannot
405 // necessarily produce the value 0 (if the code is above 4GB).
406 // Same for the tiny code model, where we have a pc relative LDR.
409 return AArch64II::MO_GOT;
410
411 // References to tagged globals are marked with MO_NC | MO_TAGGED to indicate
412 // that their nominal addresses are tagged and outside of the code model. In
413 // AArch64ExpandPseudo::expandMI we emit an additional instruction to set the
414 // tag if necessary based on MO_TAGGED.
415 if (AllowTaggedGlobals && !isa<FunctionType>(GV->getValueType()))
417
419}
420
422 const GlobalValue *GV, const TargetMachine &TM) const {
423 // MachO large model always goes via a GOT, because we don't have the
424 // relocations available to do anything else..
426 !GV->hasInternalLinkage())
427 return AArch64II::MO_GOT;
428
429 // NonLazyBind goes via GOT unless we know it's available locally.
430 auto *F = dyn_cast<Function>(GV);
431 if ((!isTargetMachO() || CLOpts.macho_enable_nonlazybind) && F &&
432 F->hasFnAttribute(Attribute::NonLazyBind) && !TM.shouldAssumeDSOLocal(GV))
433 return AArch64II::MO_GOT;
434
435 if (getTargetTriple().isOSWindows()) {
436 if (isWindowsArm64EC() && GV->getValueType()->isFunctionTy()) {
437 if (GV->hasDLLImportStorageClass()) {
438 // On Arm64EC, if we're calling a symbol from the import table
439 // directly, use MO_ARM64EC_CALLMANGLE.
442 }
443 if (GV->hasExternalLinkage()) {
444 // If we're calling a symbol directly, use the mangled form in the
445 // call instruction.
447 }
448 }
449
450 // Use ClassifyGlobalReference for setting MO_DLLIMPORT/MO_COFFSTUB.
451 return ClassifyGlobalReference(GV, TM);
452 }
453
455}
456
458 const SchedRegion &Region) const {
459 // LNT run (at least on Cyclone) showed reasonably significant gains for
460 // bi-directional scheduling. 253.perlbmk.
461 Policy.OnlyTopDown = false;
462 Policy.OnlyBottomUp = false;
463 // Enabling or Disabling the latency heuristic is a close call: It seems to
464 // help nearly no benchmark on out-of-order architectures, on the other hand
465 // it regresses register pressure on a few benchmarking.
466 Policy.DisableLatencyHeuristic = DisableLatencySchedHeuristic;
467}
468
470 SUnit *Def, int DefOpIdx, SUnit *Use, int UseOpIdx, SDep &Dep,
471 const TargetSchedModel *SchedModel) const {
472 if (!SchedModel || Dep.getKind() != SDep::Kind::Data || !Dep.getReg() ||
473 !Def->isInstr() || !Use->isInstr() ||
474 (Def->getInstr()->getOpcode() != TargetOpcode::BUNDLE &&
475 Use->getInstr()->getOpcode() != TargetOpcode::BUNDLE))
476 return;
477
478 // If the Def is a BUNDLE, find the last instruction in the bundle that defs
479 // the register.
480 const MachineInstr *DefMI = Def->getInstr();
481 if (DefMI->getOpcode() == TargetOpcode::BUNDLE) {
482 Register Reg = DefMI->getOperand(DefOpIdx).getReg();
483 for (const auto &Op : const_mi_bundle_ops(*DefMI)) {
484 if (Op.isReg() && Op.isDef() && Op.getReg() == Reg) {
485 DefMI = Op.getParent();
486 DefOpIdx = Op.getOperandNo();
487 }
488 }
489 }
490
491 // If the Use is a BUNDLE, find the first instruction that uses the Reg.
492 const MachineInstr *UseMI = Use->getInstr();
493 if (UseMI->getOpcode() == TargetOpcode::BUNDLE) {
494 Register Reg = UseMI->getOperand(UseOpIdx).getReg();
495 for (const auto &Op : const_mi_bundle_ops(*UseMI)) {
496 if (Op.isReg() && Op.isUse() && Op.getReg() == Reg) {
497 UseMI = Op.getParent();
498 UseOpIdx = Op.getOperandNo();
499 break;
500 }
501 }
502 }
503
504 Dep.setLatency(
505 SchedModel->computeOperandLatency(DefMI, DefOpIdx, UseMI, UseOpIdx));
506}
507
509 return CLOpts.early_ifcvt;
510}
511
513 if (!CLOpts.use_tbi)
514 return false;
515
516 if (TargetTriple.isDriverKit())
517 return true;
518 if (TargetTriple.isiOS()) {
519 return TargetTriple.getiOSVersion() >= VersionTuple(8);
520 }
521
522 return false;
523}
524
525std::unique_ptr<PBQPRAConstraint>
527 return balanceFPOps() ? std::make_unique<A57ChainingConstraint>() : nullptr;
528}
529
531 // We usually compute max call frame size after ISel. Do the computation now
532 // if the .mir file didn't specify it. Note that this will probably give you
533 // bogus values after PEI has eliminated the callframe setup/destroy pseudo
534 // instructions, specify explicitly if you need it to be correct.
535 MachineFrameInfo &MFI = MF.getFrameInfo();
538}
539
540bool AArch64Subtarget::useAA() const { return CLOpts.use_aa; }
541
543 // If SVE2 or SME is present (we are not SVE-1 only) and
544 // -sve-use-scalar-inc-vl is not otherwise set, enable it by default.
545 return valueOr(CLOpts.sve_use_scalar_inc_vl, hasSVE2() || hasSME());
546}
547
548// If return address signing is enabled, tail calls are emitted as follows:
549//
550// ```
551// <authenticate LR>
552// <check LR>
553// TCRETURN ; the callee may sign and spill the LR in its prologue
554// ```
555//
556// LR may require explicit checking because if FEAT_FPAC is not implemented
557// and LR was tampered with, then `<authenticate LR>` will not generate an
558// exception on its own. Later, if the callee spills the signed LR value and
559// neither FEAT_PAuth2 nor FEAT_EPAC are implemented, the valid PAC replaces
560// the higher bits of LR thus hiding the authentication failure.
562 const MachineFunction &MF) const {
563 // TODO: Check subtarget for the scheme. Present variant is a default for
564 // pauthtest ABI.
565 if (MF.getFunction().hasFnAttribute("ptrauth-returns") &&
566 MF.getFunction().hasFnAttribute("ptrauth-auth-traps"))
568 // At now, use None by default because checks may introduce an unexpected
569 // performance regression or incompatibility with execute-only mappings.
570 return CLOpts.authenticated_lr_check_method.value_or(
572}
573
574std::optional<uint16_t>
576 const Function &ParentFn) const {
577 if (!ParentFn.hasFnAttribute("ptrauth-indirect-gotos"))
578 return std::nullopt;
579 // We currently have one simple mechanism for all targets.
580 // This isn't ABI, so we can always do better in the future.
582 (Twine(ParentFn.getName()) + " blockaddress").str());
583}
584
586 // The Darwin kernel implements special protections for x16 and x17 so we
587 // should prefer to use those registers on that platform.
588 return isTargetDarwin();
589}
590
592 return getSchedModel().hasInstrSchedModel();
593}
594
595/// Returns a MOVK's shifter operand, or 0 otherwise.
596static unsigned getMOVKShiftImm(const MachineInstr &MI) {
597 unsigned Opc = MI.getOpcode();
598 if (Opc != AArch64::MOVKWi && Opc != AArch64::MOVKXi)
599 return 0;
600 return MI.getOperand(3).getImm();
601}
602
603/// \p HasFirst is false when the 1st instruction is a wildcard.
604static bool fusesMOVImmPairImpl(const AArch64Subtarget &ST, bool HasFirst,
605 unsigned FirstOpc, unsigned FirstShift,
606 unsigned SecondOpc, unsigned SecondShift) {
607 assert(ST.hasFuseLiterals() && "the subtarget doesn't fuse move immediate");
608
609 // 32 bit immediate.
610 if ((!HasFirst || FirstOpc == AArch64::MOVZWi) &&
611 SecondOpc == AArch64::MOVKWi && SecondShift == 16)
612 return true;
613
614 // Lower half of 64 bit immediate.
615 if ((!HasFirst || FirstOpc == AArch64::MOVZXi) &&
616 SecondOpc == AArch64::MOVKXi && SecondShift == 16)
617 return true;
618
619 // Upper half of 64 bit immediate.
620 if ((!HasFirst || (FirstOpc == AArch64::MOVKXi && FirstShift == 32)) &&
621 SecondOpc == AArch64::MOVKXi && SecondShift == 48)
622 return true;
623
624 return false;
625}
626
627bool AArch64Subtarget::fusesMOVImmPair(unsigned FirstOpc, unsigned FirstShift,
628 unsigned SecondOpc,
629 unsigned SecondShift) const {
630 return fusesMOVImmPairImpl(*this, /*HasFirst=*/true, FirstOpc, FirstShift,
631 SecondOpc, SecondShift);
632}
633
635 const MachineInstr &SecondMI) const {
636 return fusesMOVImmPairImpl(*this, FirstMI != nullptr,
637 FirstMI ? FirstMI->getOpcode() : 0,
638 FirstMI ? getMOVKShiftImm(*FirstMI) : 0,
639 SecondMI.getOpcode(), getMOVKShiftImm(SecondMI));
640}
This file describes how to lower LLVM calls to machine code calls.
MachineInstrBuilder & UseMI
MachineInstrBuilder MachineInstrBuilder & DefMI
This file declares the targeting of the Machinelegalizer class for AArch64.
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
aarch64 promote const
This file declares the targeting of the RegisterBankInfo class for AArch64.
static bool fusesMOVImmPairImpl(const AArch64Subtarget &ST, bool HasFirst, unsigned FirstOpc, unsigned FirstShift, unsigned SecondOpc, unsigned SecondShift)
HasFirst is false when the 1st instruction is a wildcard.
static unsigned getMOVKShiftImm(const MachineInstr &MI)
Returns a MOVK's shifter operand, or 0 otherwise.
static cl::list< std::string > ReservedRegsForRA("reserve-regs-for-regalloc", cl::desc("Reserve physical " "registers, so they can't be used by register allocator. " "Should only be used for testing register allocator."), cl::CommaSeparated, cl::Hidden)
IRTranslator LLVM IR MI
static cl::opt< unsigned > EpilogueVectorizationMinVF("epilogue-vectorization-minimum-VF", cl::Hidden, cl::desc("Only loops with vectorization factor equal to or larger than " "the specified value are considered for epilogue vectorization."))
#define F(x, y, z)
Definition MD5.cpp:54
Register const TargetRegisterInfo * TRI
static cl::opt< unsigned > CacheLineSize("cache-line-size", cl::init(0), cl::Hidden, cl::desc("Use this to override the target cache line size when " "specified by the user."))
This class provides the information for the target register banks.
const CallLowering * getCallLowering() const override
const AArch64RegisterInfo * getRegisterInfo() const override
TailFoldingOpts DefaultSVETFOpts
std::unique_ptr< InstructionSelector > InstSelector
ARMProcFamilyEnum ARMProcFamily
ARMProcFamily - ARM processor family: Cortex-A53, Cortex-A57, and others.
std::unique_ptr< RegisterBankInfo > RegBankInfo
bool enableEarlyIfConversion() const override
const InlineAsmLowering * getInlineAsmLowering() const override
const AArch64Options & getCLOpts() const
unsigned getVectorInsertExtractBaseCost() const
bool enableMachinePipeliner() const override
std::unique_ptr< CallLowering > CallLoweringInfo
GlobalISel related APIs.
std::optional< uint16_t > getPtrAuthBlockAddressDiscriminatorIfEnabled(const Function &ParentFn) const
Compute the integer discriminator for a given BlockAddress constant, if blockaddress signing is enabl...
unsigned classifyGlobalFunctionReference(const GlobalValue *GV, const TargetMachine &TM) const
bool useAA() const override
bool fusesMOVImmPair(unsigned FirstOpc, unsigned FirstShift, unsigned SecondOpc, unsigned SecondShift) const
Return true if the subtarget fuses this pair of move immediate instructions.
const AArch64TargetLowering * getTargetLowering() const override
bool supportsAddressTopByteIgnored() const
CPU has TBI (top byte of addresses is ignored during HW address translation) and OS enables it.
void overrideSchedPolicy(MachineSchedPolicy &Policy, const SchedRegion &Region) const override
const Triple & getTargetTriple() const
void adjustSchedDependency(SUnit *Def, int DefOpIdx, SUnit *Use, int UseOpIdx, SDep &Dep, const TargetSchedModel *SchedModel) const override
void mirFileLoaded(MachineFunction &MF) const override
Triple TargetTriple
TargetTriple - What processor and OS we're targeting.
InstructionSelector * getInstructionSelector() const override
unsigned ClassifyGlobalReference(const GlobalValue *GV, const TargetMachine &TM) const
ClassifyGlobalReference - Find the target operand flags that describe how a global value should be re...
void ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS)
ParseSubtargetFeatures - Parses features string setting specified subtarget options.
bool isX16X17Safer() const
Returns whether the operating system makes it safer to store sensitive values in x16 and x17 as oppos...
bool useScalarIncVL() const
Returns true to use the addvl/inc/dec instructions, as opposed to separate add + cnt instructions.
const LegalizerInfo * getLegalizerInfo() const override
AArch64Subtarget(const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS, const TargetMachine &TM, bool LittleEndian, unsigned MinSVEVectorSizeInBitsOverride=0, unsigned MaxSVEVectorSizeInBitsOverride=0, bool IsStreaming=false, bool IsStreamingCompatible=false, bool HasMinSize=false, bool EnableSRLTSubregToRegMitigation=false)
This constructor initializes the data members to match that of the specified triple.
std::unique_ptr< PBQPRAConstraint > getCustomPBQPConstraints() const override
AArch64PAuth::AuthCheckMethod getAuthenticatedLRCheckMethod(const MachineFunction &MF) const
Choose a method of checking LR before performing a tail call.
AArch64InstrInfo InstrInfo
AArch64TargetLowering TLInfo
const RegisterBankInfo * getRegBankInfo() const override
std::unique_ptr< LegalizerInfo > Legalizer
std::unique_ptr< InlineAsmLowering > InlineAsmLoweringInfo
bool hasFnAttribute(Attribute::AttrKind Kind) const
Return true if the function has the attribute.
Definition Function.cpp:734
bool hasExternalLinkage() const
bool isTagged() const
bool hasExternalWeakLinkage() const
bool hasDLLImportStorageClass() const
bool hasInternalLinkage() const
Type * getValueType() const
The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted.
LLVM_ABI void computeMaxCallFrameSize(MachineFunction &MF, std::vector< MachineBasicBlock::iterator > *FrameSDOps=nullptr)
Computes the maximum size of a callframe.
bool isMaxCallFrameSizeComputed() const
MachineFrameInfo & getFrameInfo()
getFrameInfo - Return the frame info object for the current function.
Function & getFunction()
Return the LLVM function that this machine code represents.
Representation of each machine instruction.
unsigned getOpcode() const
Returns the opcode of this MachineInstr.
Holds all the information related to register banks.
Wrapper class representing virtual and physical registers.
Definition Register.h:20
Scheduling dependency.
Definition ScheduleDAG.h:54
Kind getKind() const
Returns an enum value representing the kind of the dependence.
@ Data
Regular data dependence (aka true-dependence).
Definition ScheduleDAG.h:58
void setLatency(unsigned Lat)
Sets the latency for this edge.
Register getReg() const
Returns the register associated with this edge.
Scheduling unit. This is a node in the scheduling DAG.
size_type count(StringRef Key) const
count - Return 1 if the element is in the map, 0 otherwise.
Definition StringMap.h:275
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
constexpr bool empty() const
Check if the string is empty.
Definition StringRef.h:141
StringSet - A wrapper for StringMap that provides set-like functionality.
Definition StringSet.h:25
Primary interface to the complete machine description for the target machine.
bool shouldAssumeDSOLocal(const GlobalValue *GV) const
CodeModel::Model getCodeModel() const
Returns the code model.
Provide an instruction scheduling machine model to CodeGen passes.
LLVM_ABI unsigned computeOperandLatency(const MachineInstr *DefMI, unsigned DefOperIdx, const MachineInstr *UseMI, unsigned UseOperIdx) const
Compute operand latency based on the available machine model.
Triple - Helper class for working with autoconf configuration names.
Definition Triple.h:48
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition Twine.h:82
bool isFunctionTy() const
True if this is an instance of FunctionType.
Definition Type.h:268
A Use represents the edge between a Value definition and its users.
Definition Use.h:35
LLVM_ABI StringRef getName() const
Return a constant reference to the value's name.
Definition Value.cpp:319
Represents a version number in the form major[.minor[.subminor[.build]]].
@ MO_DLLIMPORT
MO_DLLIMPORT - On a symbol operand, this represents that the reference to the symbol is for an import...
@ MO_NC
MO_NC - Indicates whether the linker is expected to check the symbol reference for overflow.
@ MO_GOT
MO_GOT - This flag indicates that a symbol operand represents the address of the GOT entry for the sy...
@ MO_ARM64EC_CALLMANGLE
MO_ARM64EC_CALLMANGLE - Operand refers to the Arm64EC-mangled version of a symbol,...
@ MO_TAGGED
MO_TAGGED - With MO_PAGE, indicates that the page includes a memory tag in bits 56-63.
@ MO_COFFSTUB
MO_COFFSTUB - On a symbol operand "FOO", this indicates that the reference is actually to the "....
AuthCheckMethod
Variants of check performed on an authenticated pointer.
@ HighBitsNoTBI
Check by comparing bits 62 and 61 of the authenticated address.
@ None
Do not check the value at all.
LLVM_ABI bool isX18ReservedByDefault(const Triple &TT)
This is an optimization pass for GlobalISel generic memory operations.
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
Definition Casting.h:643
constexpr from_range_t from_range
InstructionSelector * createAArch64InstructionSelector(const AArch64TargetMachine &, const AArch64Subtarget &, const AArch64RegisterBankInfo &)
iterator_range< ConstMIBundleOperands > const_mi_bundle_ops(const MachineInstr &MI)
bool isa(const From &Val)
isa<X> - Return true if the parameter to the template is an instance of one of the template type argu...
Definition Casting.h:547
LLVM_ABI uint16_t getPointerAuthStableSipHash(StringRef S)
Compute a stable non-zero 16-bit hash of the given string.
Definition SipHash.cpp:49
DWARFExpression::Operation Op
constexpr bool valueOr(BoolOrDefault X, bool Default)
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition Alignment.h:39
Define a generic scheduling policy for targets that don't provide their own MachineSchedStrategy.
A region of an MBB for scheduling.