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 case AppleM6:
170 PrefetchDistance = 280;
171 MinPrefetchStride = 2048;
173 break;
174 case ExynosM3:
175 MaxJumpTableSize = 20;
178 break;
179 case Falkor:
180 // FIXME: remove this to enable 64-bit SLP if performance looks good.
182 CacheLineSize = 128;
183 PrefetchDistance = 820;
184 MinPrefetchStride = 2048;
186 break;
187 case Kryo:
189 CacheLineSize = 128;
190 PrefetchDistance = 740;
191 MinPrefetchStride = 1024;
193 // FIXME: remove this to enable 64-bit SLP if performance looks good.
195 break;
196 case NeoverseE1:
198 break;
199 case NeoverseN1:
203 break;
204 case NeoverseV2:
205 case NeoverseV3:
207 ScatterOverhead = 13;
208 [[fallthrough]];
209 case NeoverseN2:
210 case NeoverseN3:
211 case NeoverseV3AE:
215 VScaleForTuning = 1;
216 break;
217 case NeoverseV1:
221 VScaleForTuning = 2;
223 break;
224 case Neoverse512TVB:
226 VScaleForTuning = 1;
227 break;
228 case Saphira:
229 // FIXME: remove this to enable 64-bit SLP if performance looks good.
231 break;
232 case ThunderX2T99:
235 PrefetchDistance = 128;
236 MinPrefetchStride = 1024;
238 // FIXME: remove this to enable 64-bit SLP if performance looks good.
240 break;
241 case ThunderX:
242 case ThunderXT88:
243 case ThunderXT81:
244 case ThunderXT83:
245 CacheLineSize = 128;
248 // FIXME: remove this to enable 64-bit SLP if performance looks good.
250 break;
251 case TSV110:
254 break;
255 case HIP12:
258 VScaleForTuning = 2;
260 break;
261 case ThunderX3T110:
264 PrefetchDistance = 128;
265 MinPrefetchStride = 1024;
267 // FIXME: remove this to enable 64-bit SLP if performance looks good.
269 break;
270 case Ampere1:
271 case Ampere1A:
272 case Ampere1B:
273 case Ampere1C:
276 break;
277 case Oryon:
279 PrefetchDistance = 128;
280 MinPrefetchStride = 1024;
281 break;
282 case Olympus:
284 ScatterOverhead = 13;
288 VScaleForTuning = 1;
289 break;
290 }
291
292 if (CLOpts.min_jump_table_entries || !HasMinSize)
293 MinimumJumpTableEntries = CLOpts.min_jump_table_entries.value_or(10);
294 if (CLOpts.sve_vscale_for_tuning)
295 VScaleForTuning = *CLOpts.sve_vscale_for_tuning;
296}
297
299 StringRef TuneCPU, StringRef FS,
300 const TargetMachine &TM, bool LittleEndian,
301 unsigned MinSVEVectorSizeInBitsOverride,
302 unsigned MaxSVEVectorSizeInBitsOverride,
304 bool HasMinSize,
306 : AArch64GenSubtargetInfo(TT, CPU, TuneCPU, FS),
307 CLOpts(static_cast<const AArch64TargetMachine &>(TM).getCLOpts()),
308 ReserveXRegister(AArch64::GPR64commonRegClass.getNumRegs()),
309 ReserveXRegisterForRA(AArch64::GPR64commonRegClass.getNumRegs()),
310 CustomCallSavedXRegs(AArch64::GPR64commonRegClass.getNumRegs()),
311 IsLittle(LittleEndian), IsStreaming(IsStreaming),
313 MinSVEVectorSizeInBits(MinSVEVectorSizeInBitsOverride),
314 MaxSVEVectorSizeInBits(MaxSVEVectorSizeInBitsOverride),
316 // To benefit from SME2's strided-register multi-vector load/store
317 // instructions we'll need to enable subreg liveness. Our longer
318 // term aim is to make this the default, regardless of streaming
319 // mode, but there are still some outstanding issues, see:
320 // https://github.com/llvm/llvm-project/pull/174188
321 // and:
322 // https://github.com/llvm/llvm-project/pull/168353
324 CLOpts.enable_subreg_liveness_tracking),
325 TargetTriple(TT),
326 InstrInfo(initializeSubtargetDependencies(FS, CPU, TuneCPU, HasMinSize)),
327 TLInfo(TM, *this) {
329 ReserveXRegister.set(18);
330 if (isLFI()) {
331 ReserveXRegister.set(25, 29);
332 ReserveLRForRA = true;
333 }
334
337 Legalizer.reset(new AArch64LegalizerInfo(*this));
338
339 auto *RBI = new AArch64RegisterBankInfo(*getRegisterInfo());
340
341 // FIXME: At this point, we can't rely on Subtarget having RBI.
342 // It's awkward to mix passing RBI and the Subtarget; should we pass
343 // TII/TRI as well?
345 *static_cast<const AArch64TargetMachine *>(&TM), *this, *RBI));
346
347 RegBankInfo.reset(RBI);
348
349 auto TRI = getRegisterInfo();
351 for (unsigned i = 0; i < 29; ++i) {
352 if (ReservedRegNames.count(TRI->getName(AArch64::X0 + i)))
354 }
355 // X30 is named LR, so we can't use TRI->getName to check X30.
356 if (ReservedRegNames.count("X30") || ReservedRegNames.count("LR"))
357 ReserveXRegisterForRA.set(30);
358 // X29 is named FP, so we can't use TRI->getName to check X29.
359 if (ReservedRegNames.count("X29") || ReservedRegNames.count("FP"))
360 ReserveXRegisterForRA.set(29);
361}
362
366
370
374
376 return Legalizer.get();
377}
378
380 return RegBankInfo.get();
381}
382
383/// Find the target operand flags that describe how a global value should be
384/// referenced for the current subtarget.
385unsigned
387 const TargetMachine &TM) const {
388 // MachO large model always goes via a GOT, simply to get a single 8-byte
389 // absolute relocation on all global addresses.
391 return AArch64II::MO_GOT;
392
393 // All globals dynamically protected by MTE must have their address tags
394 // synthesized. This is done by having the loader stash the tag in the GOT
395 // entry. Force all tagged globals (even ones with internal linkage) through
396 // the GOT.
397 if (GV->isTagged())
398 return AArch64II::MO_GOT;
399
400 if (!TM.shouldAssumeDSOLocal(GV)) {
401 if (GV->hasDLLImportStorageClass()) {
403 }
404 if (getTargetTriple().isOSWindowsOrUEFI())
406 return AArch64II::MO_GOT;
407 }
408
409 // The small code model's direct accesses use ADRP, which cannot
410 // necessarily produce the value 0 (if the code is above 4GB).
411 // Same for the tiny code model, where we have a pc relative LDR.
414 return AArch64II::MO_GOT;
415
416 // References to tagged globals are marked with MO_NC | MO_TAGGED to indicate
417 // that their nominal addresses are tagged and outside of the code model. In
418 // AArch64ExpandPseudo::expandMI we emit an additional instruction to set the
419 // tag if necessary based on MO_TAGGED.
420 if (AllowTaggedGlobals && !isa<FunctionType>(GV->getValueType()))
422
424}
425
427 const GlobalValue *GV, const TargetMachine &TM) const {
428 // MachO large model always goes via a GOT, because we don't have the
429 // relocations available to do anything else..
431 !GV->hasInternalLinkage())
432 return AArch64II::MO_GOT;
433
434 // NonLazyBind goes via GOT unless we know it's available locally.
435 auto *F = dyn_cast<Function>(GV);
436 if ((!isTargetMachO() || CLOpts.macho_enable_nonlazybind) && F &&
437 F->hasFnAttribute(Attribute::NonLazyBind) && !TM.shouldAssumeDSOLocal(GV))
438 return AArch64II::MO_GOT;
439
440 if (getTargetTriple().isOSWindowsOrUEFI()) {
441 if (isWindowsArm64EC() && GV->getValueType()->isFunctionTy()) {
442 if (GV->hasDLLImportStorageClass()) {
443 // On Arm64EC, if we're calling a symbol from the import table
444 // directly, use MO_ARM64EC_CALLMANGLE.
447 }
448 if (GV->hasExternalLinkage()) {
449 // If we're calling a symbol directly, use the mangled form in the
450 // call instruction.
452 }
453 }
454
455 // Use ClassifyGlobalReference for setting MO_DLLIMPORT/MO_COFFSTUB.
456 return ClassifyGlobalReference(GV, TM);
457 }
458
460}
461
463 const SchedRegion &Region) const {
464 // LNT run (at least on Cyclone) showed reasonably significant gains for
465 // bi-directional scheduling. 253.perlbmk.
466 Policy.OnlyTopDown = false;
467 Policy.OnlyBottomUp = false;
468 // Enabling or Disabling the latency heuristic is a close call: It seems to
469 // help nearly no benchmark on out-of-order architectures, on the other hand
470 // it regresses register pressure on a few benchmarking.
471 Policy.DisableLatencyHeuristic = DisableLatencySchedHeuristic;
472}
473
475 SUnit *Def, int DefOpIdx, SUnit *Use, int UseOpIdx, SDep &Dep,
476 const TargetSchedModel *SchedModel) const {
477 if (!SchedModel || Dep.getKind() != SDep::Kind::Data || !Dep.getReg() ||
478 !Def->isInstr() || !Use->isInstr() ||
479 (Def->getInstr()->getOpcode() != TargetOpcode::BUNDLE &&
480 Use->getInstr()->getOpcode() != TargetOpcode::BUNDLE))
481 return;
482
483 // If the Def is a BUNDLE, find the last instruction in the bundle that defs
484 // the register.
485 const MachineInstr *DefMI = Def->getInstr();
486 if (DefMI->getOpcode() == TargetOpcode::BUNDLE) {
487 Register Reg = DefMI->getOperand(DefOpIdx).getReg();
488 for (const auto &Op : const_mi_bundle_ops(*DefMI)) {
489 if (Op.isReg() && Op.isDef() && Op.getReg() == Reg) {
490 DefMI = Op.getParent();
491 DefOpIdx = Op.getOperandNo();
492 }
493 }
494 }
495
496 // If the Use is a BUNDLE, find the first instruction that uses the Reg.
497 const MachineInstr *UseMI = Use->getInstr();
498 if (UseMI->getOpcode() == TargetOpcode::BUNDLE) {
499 Register Reg = UseMI->getOperand(UseOpIdx).getReg();
500 for (const auto &Op : const_mi_bundle_ops(*UseMI)) {
501 if (Op.isReg() && Op.isUse() && Op.getReg() == Reg) {
502 UseMI = Op.getParent();
503 UseOpIdx = Op.getOperandNo();
504 break;
505 }
506 }
507 }
508
509 Dep.setLatency(
510 SchedModel->computeOperandLatency(DefMI, DefOpIdx, UseMI, UseOpIdx));
511}
512
514 return CLOpts.early_ifcvt;
515}
516
518 if (!CLOpts.use_tbi)
519 return false;
520
521 if (TargetTriple.isDriverKit())
522 return true;
523 if (TargetTriple.isiOS()) {
524 return TargetTriple.getiOSVersion() >= VersionTuple(8);
525 }
526
527 return false;
528}
529
530std::unique_ptr<PBQPRAConstraint>
532 return balanceFPOps() ? std::make_unique<A57ChainingConstraint>() : nullptr;
533}
534
536 // We usually compute max call frame size after ISel. Do the computation now
537 // if the .mir file didn't specify it. Note that this will probably give you
538 // bogus values after PEI has eliminated the callframe setup/destroy pseudo
539 // instructions, specify explicitly if you need it to be correct.
540 MachineFrameInfo &MFI = MF.getFrameInfo();
543}
544
545bool AArch64Subtarget::useAA() const { return CLOpts.use_aa; }
546
548 // If SVE2 or SME is present (we are not SVE-1 only) and
549 // -sve-use-scalar-inc-vl is not otherwise set, enable it by default.
550 return valueOr(CLOpts.sve_use_scalar_inc_vl, hasSVE2() || hasSME());
551}
552
553// If return address signing is enabled, tail calls are emitted as follows:
554//
555// ```
556// <authenticate LR>
557// <check LR>
558// TCRETURN ; the callee may sign and spill the LR in its prologue
559// ```
560//
561// LR may require explicit checking because if FEAT_FPAC is not implemented
562// and LR was tampered with, then `<authenticate LR>` will not generate an
563// exception on its own. Later, if the callee spills the signed LR value and
564// neither FEAT_PAuth2 nor FEAT_EPAC are implemented, the valid PAC replaces
565// the higher bits of LR thus hiding the authentication failure.
567 const MachineFunction &MF) const {
568 // TODO: Check subtarget for the scheme. Present variant is a default for
569 // pauthtest ABI.
570 if (MF.getFunction().hasFnAttribute("ptrauth-returns") &&
571 MF.getFunction().hasFnAttribute("ptrauth-auth-traps"))
573 // At now, use None by default because checks may introduce an unexpected
574 // performance regression or incompatibility with execute-only mappings.
575 return CLOpts.authenticated_lr_check_method.value_or(
577}
578
579std::optional<uint16_t>
581 const Function &ParentFn) const {
582 if (!ParentFn.hasFnAttribute("ptrauth-indirect-gotos"))
583 return std::nullopt;
584 // We currently have one simple mechanism for all targets.
585 // This isn't ABI, so we can always do better in the future.
587 (Twine(ParentFn.getName()) + " blockaddress").str());
588}
589
591 // The Darwin kernel implements special protections for x16 and x17 so we
592 // should prefer to use those registers on that platform.
593 return isTargetDarwin();
594}
595
597 return getSchedModel().hasInstrSchedModel();
598}
599
600/// Returns a MOVK's shifter operand, or 0 otherwise.
601static unsigned getMOVKShiftImm(const MachineInstr &MI) {
602 unsigned Opc = MI.getOpcode();
603 if (Opc != AArch64::MOVKWi && Opc != AArch64::MOVKXi)
604 return 0;
605 return MI.getOperand(3).getImm();
606}
607
608/// \p HasFirst is false when the 1st instruction is a wildcard.
609static bool fusesMOVImmPairImpl(const AArch64Subtarget &ST, bool HasFirst,
610 unsigned FirstOpc, unsigned FirstShift,
611 unsigned SecondOpc, unsigned SecondShift) {
612 assert(ST.hasFuseLiterals() && "the subtarget doesn't fuse move immediate");
613
614 // 32 bit immediate.
615 if ((!HasFirst || FirstOpc == AArch64::MOVZWi) &&
616 SecondOpc == AArch64::MOVKWi && SecondShift == 16)
617 return true;
618
619 // Lower half of 64 bit immediate.
620 if ((!HasFirst || FirstOpc == AArch64::MOVZXi) &&
621 SecondOpc == AArch64::MOVKXi && SecondShift == 16)
622 return true;
623
624 // Upper half of 64 bit immediate.
625 if ((!HasFirst || (FirstOpc == AArch64::MOVKXi && FirstShift == 32)) &&
626 SecondOpc == AArch64::MOVKXi && SecondShift == 48)
627 return true;
628
629 return false;
630}
631
632bool AArch64Subtarget::fusesMOVImmPair(unsigned FirstOpc, unsigned FirstShift,
633 unsigned SecondOpc,
634 unsigned SecondShift) const {
635 return fusesMOVImmPairImpl(*this, /*HasFirst=*/true, FirstOpc, FirstShift,
636 SecondOpc, SecondShift);
637}
638
640 const MachineInstr &SecondMI) const {
641 return fusesMOVImmPairImpl(*this, FirstMI != nullptr,
642 FirstMI ? FirstMI->getOpcode() : 0,
643 FirstMI ? getMOVKShiftImm(*FirstMI) : 0,
644 SecondMI.getOpcode(), getMOVKShiftImm(SecondMI));
645}
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
#define F(x, y, z)
Definition MD5.cpp:54
Register const TargetRegisterInfo * TRI
if(PassOpts->AAPipeline)
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:731
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:27
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:314
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.