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
333 Legalizer.reset(new AArch64LegalizerInfo(*this));
334
335 auto *RBI = new AArch64RegisterBankInfo(*getRegisterInfo());
336
337 // FIXME: At this point, we can't rely on Subtarget having RBI.
338 // It's awkward to mix passing RBI and the Subtarget; should we pass
339 // TII/TRI as well?
341 *static_cast<const AArch64TargetMachine *>(&TM), *this, *RBI));
342
343 RegBankInfo.reset(RBI);
344
345 auto TRI = getRegisterInfo();
347 for (unsigned i = 0; i < 29; ++i) {
348 if (ReservedRegNames.count(TRI->getName(AArch64::X0 + i)))
350 }
351 // X30 is named LR, so we can't use TRI->getName to check X30.
352 if (ReservedRegNames.count("X30") || ReservedRegNames.count("LR"))
353 ReserveXRegisterForRA.set(30);
354 // X29 is named FP, so we can't use TRI->getName to check X29.
355 if (ReservedRegNames.count("X29") || ReservedRegNames.count("FP"))
356 ReserveXRegisterForRA.set(29);
357}
358
362
366
370
372 return Legalizer.get();
373}
374
376 return RegBankInfo.get();
377}
378
379/// Find the target operand flags that describe how a global value should be
380/// referenced for the current subtarget.
381unsigned
383 const TargetMachine &TM) const {
384 // MachO large model always goes via a GOT, simply to get a single 8-byte
385 // absolute relocation on all global addresses.
387 return AArch64II::MO_GOT;
388
389 // All globals dynamically protected by MTE must have their address tags
390 // synthesized. This is done by having the loader stash the tag in the GOT
391 // entry. Force all tagged globals (even ones with internal linkage) through
392 // the GOT.
393 if (GV->isTagged())
394 return AArch64II::MO_GOT;
395
396 if (!TM.shouldAssumeDSOLocal(GV)) {
397 if (GV->hasDLLImportStorageClass()) {
399 }
400 if (getTargetTriple().isOSWindowsOrUEFI())
402 return AArch64II::MO_GOT;
403 }
404
405 // The small code model's direct accesses use ADRP, which cannot
406 // necessarily produce the value 0 (if the code is above 4GB).
407 // Same for the tiny code model, where we have a pc relative LDR.
410 return AArch64II::MO_GOT;
411
412 // References to tagged globals are marked with MO_NC | MO_TAGGED to indicate
413 // that their nominal addresses are tagged and outside of the code model. In
414 // AArch64ExpandPseudo::expandMI we emit an additional instruction to set the
415 // tag if necessary based on MO_TAGGED.
416 if (AllowTaggedGlobals && !isa<FunctionType>(GV->getValueType()))
418
420}
421
423 const GlobalValue *GV, const TargetMachine &TM) const {
424 // MachO large model always goes via a GOT, because we don't have the
425 // relocations available to do anything else..
427 !GV->hasInternalLinkage())
428 return AArch64II::MO_GOT;
429
430 // NonLazyBind goes via GOT unless we know it's available locally.
431 auto *F = dyn_cast<Function>(GV);
432 if ((!isTargetMachO() || CLOpts.macho_enable_nonlazybind) && F &&
433 F->hasFnAttribute(Attribute::NonLazyBind) && !TM.shouldAssumeDSOLocal(GV))
434 return AArch64II::MO_GOT;
435
436 if (getTargetTriple().isOSWindowsOrUEFI()) {
437 if (isWindowsArm64EC() && GV->getValueType()->isFunctionTy()) {
438 if (GV->hasDLLImportStorageClass()) {
439 // On Arm64EC, if we're calling a symbol from the import table
440 // directly, use MO_ARM64EC_CALLMANGLE.
443 }
444 if (GV->hasExternalLinkage()) {
445 // If we're calling a symbol directly, use the mangled form in the
446 // call instruction.
448 }
449 }
450
451 // Use ClassifyGlobalReference for setting MO_DLLIMPORT/MO_COFFSTUB.
452 return ClassifyGlobalReference(GV, TM);
453 }
454
456}
457
459 const SchedRegion &Region) const {
460 // LNT run (at least on Cyclone) showed reasonably significant gains for
461 // bi-directional scheduling. 253.perlbmk.
462 Policy.OnlyTopDown = false;
463 Policy.OnlyBottomUp = false;
464 // Enabling or Disabling the latency heuristic is a close call: It seems to
465 // help nearly no benchmark on out-of-order architectures, on the other hand
466 // it regresses register pressure on a few benchmarking.
467 Policy.DisableLatencyHeuristic = DisableLatencySchedHeuristic;
468}
469
471 SUnit *Def, int DefOpIdx, SUnit *Use, int UseOpIdx, SDep &Dep,
472 const TargetSchedModel *SchedModel) const {
473 if (!SchedModel || Dep.getKind() != SDep::Kind::Data || !Dep.getReg() ||
474 !Def->isInstr() || !Use->isInstr() ||
475 (Def->getInstr()->getOpcode() != TargetOpcode::BUNDLE &&
476 Use->getInstr()->getOpcode() != TargetOpcode::BUNDLE))
477 return;
478
479 // If the Def is a BUNDLE, find the last instruction in the bundle that defs
480 // the register.
481 const MachineInstr *DefMI = Def->getInstr();
482 if (DefMI->getOpcode() == TargetOpcode::BUNDLE) {
483 Register Reg = DefMI->getOperand(DefOpIdx).getReg();
484 for (const auto &Op : const_mi_bundle_ops(*DefMI)) {
485 if (Op.isReg() && Op.isDef() && Op.getReg() == Reg) {
486 DefMI = Op.getParent();
487 DefOpIdx = Op.getOperandNo();
488 }
489 }
490 }
491
492 // If the Use is a BUNDLE, find the first instruction that uses the Reg.
493 const MachineInstr *UseMI = Use->getInstr();
494 if (UseMI->getOpcode() == TargetOpcode::BUNDLE) {
495 Register Reg = UseMI->getOperand(UseOpIdx).getReg();
496 for (const auto &Op : const_mi_bundle_ops(*UseMI)) {
497 if (Op.isReg() && Op.isUse() && Op.getReg() == Reg) {
498 UseMI = Op.getParent();
499 UseOpIdx = Op.getOperandNo();
500 break;
501 }
502 }
503 }
504
505 Dep.setLatency(
506 SchedModel->computeOperandLatency(DefMI, DefOpIdx, UseMI, UseOpIdx));
507}
508
510 return CLOpts.early_ifcvt;
511}
512
514 if (!CLOpts.use_tbi)
515 return false;
516
517 if (TargetTriple.isDriverKit())
518 return true;
519 if (TargetTriple.isiOS()) {
520 return TargetTriple.getiOSVersion() >= VersionTuple(8);
521 }
522
523 return false;
524}
525
526std::unique_ptr<PBQPRAConstraint>
528 return balanceFPOps() ? std::make_unique<A57ChainingConstraint>() : nullptr;
529}
530
532 // We usually compute max call frame size after ISel. Do the computation now
533 // if the .mir file didn't specify it. Note that this will probably give you
534 // bogus values after PEI has eliminated the callframe setup/destroy pseudo
535 // instructions, specify explicitly if you need it to be correct.
536 MachineFrameInfo &MFI = MF.getFrameInfo();
539}
540
541bool AArch64Subtarget::useAA() const { return CLOpts.use_aa; }
542
544 // If SVE2 or SME is present (we are not SVE-1 only) and
545 // -sve-use-scalar-inc-vl is not otherwise set, enable it by default.
546 return valueOr(CLOpts.sve_use_scalar_inc_vl, hasSVE2() || hasSME());
547}
548
549// If return address signing is enabled, tail calls are emitted as follows:
550//
551// ```
552// <authenticate LR>
553// <check LR>
554// TCRETURN ; the callee may sign and spill the LR in its prologue
555// ```
556//
557// LR may require explicit checking because if FEAT_FPAC is not implemented
558// and LR was tampered with, then `<authenticate LR>` will not generate an
559// exception on its own. Later, if the callee spills the signed LR value and
560// neither FEAT_PAuth2 nor FEAT_EPAC are implemented, the valid PAC replaces
561// the higher bits of LR thus hiding the authentication failure.
563 const MachineFunction &MF) const {
564 // TODO: Check subtarget for the scheme. Present variant is a default for
565 // pauthtest ABI.
566 if (MF.getFunction().hasFnAttribute("ptrauth-returns") &&
567 MF.getFunction().hasFnAttribute("ptrauth-auth-traps"))
569 // At now, use None by default because checks may introduce an unexpected
570 // performance regression or incompatibility with execute-only mappings.
571 return CLOpts.authenticated_lr_check_method.value_or(
573}
574
575std::optional<uint16_t>
577 const Function &ParentFn) const {
578 if (!ParentFn.hasFnAttribute("ptrauth-indirect-gotos"))
579 return std::nullopt;
580 // We currently have one simple mechanism for all targets.
581 // This isn't ABI, so we can always do better in the future.
583 (Twine(ParentFn.getName()) + " blockaddress").str());
584}
585
587 // The Darwin kernel implements special protections for x16 and x17 so we
588 // should prefer to use those registers on that platform.
589 return isTargetDarwin();
590}
591
593 return getSchedModel().hasInstrSchedModel();
594}
595
596/// Returns a MOVK's shifter operand, or 0 otherwise.
597static unsigned getMOVKShiftImm(const MachineInstr &MI) {
598 unsigned Opc = MI.getOpcode();
599 if (Opc != AArch64::MOVKWi && Opc != AArch64::MOVKXi)
600 return 0;
601 return MI.getOperand(3).getImm();
602}
603
604/// \p HasFirst is false when the 1st instruction is a wildcard.
605static bool fusesMOVImmPairImpl(const AArch64Subtarget &ST, bool HasFirst,
606 unsigned FirstOpc, unsigned FirstShift,
607 unsigned SecondOpc, unsigned SecondShift) {
608 assert(ST.hasFuseLiterals() && "the subtarget doesn't fuse move immediate");
609
610 // 32 bit immediate.
611 if ((!HasFirst || FirstOpc == AArch64::MOVZWi) &&
612 SecondOpc == AArch64::MOVKWi && SecondShift == 16)
613 return true;
614
615 // Lower half of 64 bit immediate.
616 if ((!HasFirst || FirstOpc == AArch64::MOVZXi) &&
617 SecondOpc == AArch64::MOVKXi && SecondShift == 16)
618 return true;
619
620 // Upper half of 64 bit immediate.
621 if ((!HasFirst || (FirstOpc == AArch64::MOVKXi && FirstShift == 32)) &&
622 SecondOpc == AArch64::MOVKXi && SecondShift == 48)
623 return true;
624
625 return false;
626}
627
628bool AArch64Subtarget::fusesMOVImmPair(unsigned FirstOpc, unsigned FirstShift,
629 unsigned SecondOpc,
630 unsigned SecondShift) const {
631 return fusesMOVImmPairImpl(*this, /*HasFirst=*/true, FirstOpc, FirstShift,
632 SecondOpc, SecondShift);
633}
634
636 const MachineInstr &SecondMI) const {
637 return fusesMOVImmPairImpl(*this, FirstMI != nullptr,
638 FirstMI ? FirstMI->getOpcode() : 0,
639 FirstMI ? getMOVKShiftImm(*FirstMI) : 0,
640 SecondMI.getOpcode(), getMOVKShiftImm(SecondMI));
641}
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
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.