LLVM 22.0.0git
ARMSubtarget.h
Go to the documentation of this file.
1//===-- ARMSubtarget.h - Define Subtarget for the ARM ----------*- 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 declares the ARM specific subclass of TargetSubtargetInfo.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_LIB_TARGET_ARM_ARMSUBTARGET_H
14#define LLVM_LIB_TARGET_ARM_ARMSUBTARGET_H
15
16#include "ARMBaseInstrInfo.h"
17#include "ARMBaseRegisterInfo.h"
19#include "ARMFrameLowering.h"
20#include "ARMISelLowering.h"
22#include "ARMSelectionDAGInfo.h"
31#include "llvm/MC/MCSchedule.h"
35#include <bitset>
36#include <memory>
37#include <string>
38
39#define GET_SUBTARGETINFO_HEADER
40#include "ARMGenSubtargetInfo.inc"
41
42namespace llvm {
43
44class ARMBaseTargetMachine;
45class GlobalValue;
46class StringRef;
47
49protected:
52#define ARM_PROCESSOR_FAMILY(ENUM) ENUM,
53#include "llvm/TargetParser/ARMTargetParserDef.inc"
54#undef ARM_PROCESSOR_FAMILY
55 };
58
61 RClass
62 };
64#define ARM_ARCHITECTURE(ENUM) ENUM,
65#include "llvm/TargetParser/ARMTargetParserDef.inc"
66#undef ARM_ARCHITECTURE
67 };
68
69public:
70 /// What kind of timing do load multiple/store multiple instructions have.
72 /// Can load/store 2 registers/cycle.
74 /// Can load/store 2 registers/cycle, but needs an extra cycle if the access
75 /// is not 64-bit aligned.
77 /// Can load/store 1 register/cycle.
79 /// Can load/store 1 register/cycle, but needs an extra cycle for address
80 /// computation and potentially also for register writeback.
82 };
83
84 /// How the push and pop instructions of callee saved general-purpose
85 /// registers should be split.
87 /// All GPRs can be pushed in a single instruction.
88 /// push {r0-r12, lr}
89 /// vpush {d8-d15}
91
92 /// R7 and LR must be adjacent, because R7 is the frame pointer, and must
93 /// point to a frame record consisting of the previous frame pointer and the
94 /// return address.
95 /// push {r0-r7, lr}
96 /// push {r8-r12}
97 /// vpush {d8-d15}
98 /// Note that Thumb1 changes this layout when the frame pointer is R11,
99 /// using a longer sequence of instructions because R11 can't be used by a
100 /// Thumb1 push instruction. This doesn't currently have a separate enum
101 /// value, and is handled entriely within Thumb1FrameLowering::emitPrologue.
103
104 /// When the stack frame size is not known (because of variable-sized
105 /// objects or realignment), Windows SEH requires the callee-saved registers
106 /// to be stored in three regions, with R11 and LR below the floating-point
107 /// registers.
108 /// push {r0-r10, r12}
109 /// vpush {d8-d15}
110 /// push {r11, lr}
112
113 /// When generating AAPCS-compilant frame chains, R11 is the frame pointer,
114 /// and must be pushed adjacent to the return address (LR). Normally this
115 /// isn't a problem, because the only register between them is r12, which is
116 /// the intra-procedure-call scratch register, so doesn't need to be saved.
117 /// However, when PACBTI is in use, r12 contains the authentication code, so
118 /// does need to be saved. This means that we need a separate push for R11
119 /// and LR.
120 /// push {r0-r10, r12}
121 /// push {r11, lr}
122 /// vpush {d8-d15}
124 };
125
126protected:
127// Bool members corresponding to the SubtargetFeatures defined in tablegen
128#define GET_SUBTARGETINFO_MACRO(ATTRIBUTE, DEFAULT, GETTER) \
129 bool ATTRIBUTE = DEFAULT;
130#include "ARMGenSubtargetInfo.inc"
131
132 /// ARMProcFamily - ARM processor family: Cortex-A8, Cortex-A9, and others.
134
135 /// ARMProcClass - ARM processor class: None, AClass, RClass or MClass.
137
138 /// ARMArch - ARM architecture
140
141 /// UseMulOps - True if non-microcoded fused integer multiply-add and
142 /// multiply-subtract instructions should be used.
143 bool UseMulOps = false;
144
145 /// SupportsTailCall - True if the OS supports tail call. The dynamic linker
146 /// must be able to synthesize call stubs for interworking between ARM and
147 /// Thumb.
148 bool SupportsTailCall = false;
149
150 /// RestrictIT - If true, the subtarget disallows generation of complex IT
151 /// blocks.
152 bool RestrictIT = false;
153
154 /// stackAlignment - The minimum alignment known to hold of the stack frame on
155 /// entry to the function and which must be maintained by every function.
157
158 /// CPUString - String name of used CPU.
159 std::string CPUString;
160
162
163 /// Clearance before partial register updates (in number of instructions)
165
166 /// What kind of timing do load multiple/store multiple have (double issue,
167 /// single issue etc).
169
170 /// The adjustment that we need to apply to get the operand latency from the
171 /// operand cycle returned by the itinerary data for pre-ISel operands.
173
174 /// What alignment is preferred for loop bodies and functions, in log2(bytes).
176
177 /// The cost factor for MVE instructions, representing the multiple beats an
178 // instruction can take. The default is 2, (set in initSubtargetFeatures so
179 // that we can use subtarget features less than 2).
181
182 /// OptMinSize - True if we're optimising for minimum code size, equal to
183 /// the function attribute.
184 bool OptMinSize = false;
185
186 /// IsLittle - The target is Little Endian
188
189 /// TargetTriple - What processor and OS we're targeting.
191
192 /// SchedModel - Processor specific instruction costs.
194
195 /// Selected instruction itineraries (one entry per itinerary class.)
197
198 /// Options passed via command line that could influence the target
200
202
203public:
204 /// This constructor initializes the data members to match that
205 /// of the specified triple.
206 ///
207 ARMSubtarget(const Triple &TT, const std::string &CPU, const std::string &FS,
208 const ARMBaseTargetMachine &TM, bool IsLittle,
209 bool MinSize = false);
210
211 /// getMaxInlineSizeThreshold - Returns the maximum memset / memcpy size
212 /// that still makes it profitable to inline the call.
213 unsigned getMaxInlineSizeThreshold() const {
214 return 64;
215 }
216
217 /// getMaxMemcpyTPInlineSizeThreshold - Returns the maximum size
218 /// that still makes it profitable to inline a llvm.memcpy as a Tail
219 /// Predicated loop.
220 /// This threshold should only be used for constant size inputs.
221 unsigned getMaxMemcpyTPInlineSizeThreshold() const { return 128; }
222
223 /// ParseSubtargetFeatures - Parses features string setting specified
224 /// subtarget options. Definition of function is auto generated by tblgen.
226
227 /// initializeSubtargetDependencies - Initializes using a CPU and feature string
228 /// so that we can use initializer lists for subtarget initialization.
230
231 const ARMSelectionDAGInfo *getSelectionDAGInfo() const override {
232 return &TSInfo;
233 }
234
235 const ARMBaseInstrInfo *getInstrInfo() const override {
236 return InstrInfo.get();
237 }
238
239 const ARMTargetLowering *getTargetLowering() const override {
240 return &TLInfo;
241 }
242
243 const ARMFrameLowering *getFrameLowering() const override {
244 return FrameLowering.get();
245 }
246
247 const ARMBaseRegisterInfo *getRegisterInfo() const override {
248 return &InstrInfo->getRegisterInfo();
249 }
250
251 const CallLowering *getCallLowering() const override;
253 const LegalizerInfo *getLegalizerInfo() const override;
254 const RegisterBankInfo *getRegBankInfo() const override;
255
256private:
257 ARMSelectionDAGInfo TSInfo;
258 // Either Thumb1FrameLowering or ARMFrameLowering.
259 std::unique_ptr<ARMFrameLowering> FrameLowering;
260 // Either Thumb1InstrInfo or Thumb2InstrInfo.
261 std::unique_ptr<ARMBaseInstrInfo> InstrInfo;
262 ARMTargetLowering TLInfo;
263
264 /// GlobalISel related APIs.
265 std::unique_ptr<CallLowering> CallLoweringInfo;
266 std::unique_ptr<InstructionSelector> InstSelector;
267 std::unique_ptr<LegalizerInfo> Legalizer;
268 std::unique_ptr<RegisterBankInfo> RegBankInfo;
269
270 void initSubtargetFeatures(StringRef CPU, StringRef FS);
271 ARMFrameLowering *initializeFrameLowering(StringRef CPU, StringRef FS);
272
273 std::bitset<8> CoprocCDE = {};
274public:
275// Getters for SubtargetFeatures defined in tablegen
276#define GET_SUBTARGETINFO_MACRO(ATTRIBUTE, DEFAULT, GETTER) \
277 bool GETTER() const { return ATTRIBUTE; }
278#include "ARMGenSubtargetInfo.inc"
279
280 /// @{
281 /// These functions are obsolete, please consider adding subtarget features
282 /// or properties instead of calling them.
283 bool isCortexA5() const { return ARMProcFamily == CortexA5; }
284 bool isCortexA7() const { return ARMProcFamily == CortexA7; }
285 bool isCortexA8() const { return ARMProcFamily == CortexA8; }
286 bool isCortexA9() const { return ARMProcFamily == CortexA9; }
287 bool isCortexA15() const { return ARMProcFamily == CortexA15; }
288 bool isSwift() const { return ARMProcFamily == Swift; }
289 bool isCortexM3() const { return ARMProcFamily == CortexM3; }
290 bool isCortexM55() const { return ARMProcFamily == CortexM55; }
291 bool isCortexM7() const { return ARMProcFamily == CortexM7; }
292 bool isCortexM85() const { return ARMProcFamily == CortexM85; }
293 bool isLikeA9() const { return isCortexA9() || isCortexA15() || isKrait(); }
294 bool isCortexR5() const { return ARMProcFamily == CortexR5; }
295 bool isKrait() const { return ARMProcFamily == Krait; }
296 /// @}
297
298 bool hasARMOps() const { return !NoARM; }
299
301 return hasNEON() && hasNEONForFP();
302 }
303
304 bool hasVFP2Base() const { return hasVFPv2SP(); }
305 bool hasVFP3Base() const { return hasVFPv3D16SP(); }
306 bool hasVFP4Base() const { return hasVFPv4D16SP(); }
307 bool hasFPARMv8Base() const { return hasFPARMv8D16SP(); }
308
309 bool hasAnyDataBarrier() const {
310 return HasDataBarrier || (hasV6Ops() && !isThumb());
311 }
312
313 bool useMulOps() const { return UseMulOps; }
314 bool useFPVMLx() const { return !SlowFPVMLx; }
315 bool useFPVFMx() const {
316 return !isTargetDarwin() && hasVFP4Base() && !SlowFPVFMx;
317 }
318 bool useFPVFMx16() const { return useFPVFMx() && hasFullFP16(); }
319 bool useFPVFMx64() const { return useFPVFMx() && hasFP64(); }
320 bool hasBaseDSP() const {
321 if (isThumb())
322 return hasThumb2() && hasDSP();
323 else
324 return hasV5TEOps();
325 }
326
327 /// Return true if the CPU supports any kind of instruction fusion.
328 bool hasFusion() const { return hasFuseAES() || hasFuseLiterals(); }
329
330 const Triple &getTargetTriple() const { return TargetTriple; }
331
332 /// @{
333 /// These properties are per-module, please use the TargetMachine
334 /// TargetTriple.
335 bool isTargetDarwin() const { return TargetTriple.isOSDarwin(); }
336 bool isTargetIOS() const { return TargetTriple.isiOS(); }
337 bool isTargetWatchOS() const { return TargetTriple.isWatchOS(); }
338 bool isTargetWatchABI() const { return TargetTriple.isWatchABI(); }
339 bool isTargetDriverKit() const { return TargetTriple.isDriverKit(); }
340 bool isTargetLinux() const { return TargetTriple.isOSLinux(); }
341 bool isTargetNetBSD() const { return TargetTriple.isOSNetBSD(); }
342 bool isTargetWindows() const { return TargetTriple.isOSWindows(); }
343
344 bool isTargetCOFF() const { return TargetTriple.isOSBinFormatCOFF(); }
345 bool isTargetELF() const { return TargetTriple.isOSBinFormatELF(); }
347
348 bool isTargetAEABI() const { return TargetTriple.isTargetAEABI(); }
349
351
353
354 // ARM Targets that support EHABI exception handling standard
355 // Darwin uses SjLj. Other targets might need more checks.
358 }
359 /// @}
360
361 bool isReadTPSoft() const {
362 return !(isReadTPTPIDRURW() || isReadTPTPIDRURO() || isReadTPTPIDRPRW());
363 }
364
365 bool isTargetAndroid() const { return TargetTriple.isAndroid(); }
366
367 bool isXRaySupported() const override;
368
369 bool isROPI() const;
370 bool isRWPI() const;
371
372 bool useMachineScheduler() const { return UseMISched; }
373 bool useMachinePipeliner() const { return UseMIPipeliner; }
374 bool hasMinSize() const { return OptMinSize; }
375 bool isThumb1Only() const { return isThumb() && !hasThumb2(); }
376 bool isThumb2() const { return isThumb() && hasThumb2(); }
377 bool isMClass() const { return ARMProcClass == MClass; }
378 bool isRClass() const { return ARMProcClass == RClass; }
379 bool isAClass() const { return ARMProcClass == AClass; }
380
381 bool isR9Reserved() const {
382 return isTargetMachO() ? (ReserveR9 || !HasV6Ops) : ReserveR9;
383 }
384
386 if (isTargetDarwin() ||
387 (!isTargetWindows() && isThumb() && !createAAPCSFrameChain()))
388 return ARM::R7;
389 return ARM::R11;
390 }
391
394
395 bool useStride4VFPs() const;
396
397 bool useMovt() const;
398
399 bool supportsTailCall() const { return SupportsTailCall; }
400
401 bool allowsUnalignedMem() const { return !StrictAlign; }
402
403 bool restrictIT() const { return RestrictIT; }
404
405 const std::string & getCPUString() const { return CPUString; }
406
407 bool isLittle() const { return IsLittle; }
408
409 unsigned getMispredictionPenalty() const;
410
411 /// Returns true if machine scheduler should be enabled.
412 bool enableMachineScheduler() const override;
413
414 /// Returns true if machine pipeliner should be enabled.
415 bool enableMachinePipeliner() const override;
416 bool useDFAforSMS() const override;
417
418 /// True for some subtargets at > -O0.
419 bool enablePostRAScheduler() const override;
420
421 /// True for some subtargets at > -O0.
422 bool enablePostRAMachineScheduler() const override;
423
424 /// Check whether this subtarget wants to use subregister liveness.
425 bool enableSubRegLiveness() const override;
426
427 /// Enable use of alias analysis during code generation (during MI
428 /// scheduling, DAGCombine, etc.).
429 bool useAA() const override { return true; }
430
431 /// getInstrItins - Return the instruction itineraries based on subtarget
432 /// selection.
434 return &InstrItins;
435 }
436
437 /// getStackAlignment - Returns the minimum alignment known to hold of the
438 /// stack frame on entry to the function and which must be maintained by every
439 /// function for this subtarget.
441
442 // Returns the required alignment for LDRD/STRD instructions
444 return Align(hasV7Ops() || allowsUnalignedMem() ? 4 : 8);
445 }
446
447 unsigned getMaxInterleaveFactor() const { return MaxInterleaveFactor; }
448
450
452 return LdStMultipleTiming;
453 }
454
457 }
458
459 /// True if the GV will be accessed via an indirect symbol.
460 bool isGVIndirectSymbol(const GlobalValue *GV) const;
461
462 /// Returns the constant pool modifier needed to access the GV.
463 bool isGVInGOT(const GlobalValue *GV) const;
464
465 /// True if fast-isel is used.
466 bool useFastISel() const;
467
468 /// Returns the correct return opcode for the current feature set.
469 /// Use BX if available to allow mixing thumb/arm code, but fall back
470 /// to plain mov pc,lr on ARMv4.
471 unsigned getReturnOpcode() const {
472 if (isThumb())
473 return ARM::tBX_RET;
474 if (hasV4TOps())
475 return ARM::BX_RET;
476 return ARM::MOVPCLR;
477 }
478
479 /// Allow movt+movw for PIC global address calculation.
480 /// ELF does not have GOT relocations for movt+movw.
481 /// ROPI does not use GOT.
483 return isROPI() || !isTargetELF();
484 }
485
488 }
489
490 unsigned
493 return 1;
494 return MVEVectorCostFactor;
495 }
496
498 MCRegister PhysReg) const override;
499 unsigned getGPRAllocationOrder(const MachineFunction &MF) const;
500};
501
502} // end namespace llvm
503
504#endif // LLVM_LIB_TARGET_ARM_ARMSUBTARGET_H
static bool isThumb(const MCSubtargetInfo &STI)
This file describes how to lower LLVM calls to machine code calls.
static cl::opt< OutputCostKind > CostKind("cost-kind", cl::desc("Target cost kind"), cl::init(OutputCostKind::RecipThroughput), cl::values(clEnumValN(OutputCostKind::RecipThroughput, "throughput", "Reciprocal throughput"), clEnumValN(OutputCostKind::Latency, "latency", "Instruction latency"), clEnumValN(OutputCostKind::CodeSize, "code-size", "Code size"), clEnumValN(OutputCostKind::SizeAndLatency, "size-latency", "Code size and latency"), clEnumValN(OutputCostKind::All, "all", "Print all cost kinds")))
Interface for Targets to specify which operations they can successfully select and how the others sho...
This pass exposes codegen information to IR-level passes.
bool useFastISel() const
True if fast-isel is used.
bool isTargetMachO() const
Definition: ARMSubtarget.h:346
bool hasFusion() const
Return true if the CPU supports any kind of instruction fusion.
Definition: ARMSubtarget.h:328
bool isCortexA7() const
Definition: ARMSubtarget.h:284
bool IsLittle
IsLittle - The target is Little Endian.
Definition: ARMSubtarget.h:187
bool useMovt() const
bool isSwift() const
Definition: ARMSubtarget.h:288
bool isTargetAEABI() const
Definition: ARMSubtarget.h:348
bool enablePostRAScheduler() const override
True for some subtargets at > -O0.
ARMLdStMultipleTiming LdStMultipleTiming
What kind of timing do load multiple/store multiple have (double issue, single issue etc).
Definition: ARMSubtarget.h:168
bool hasARMOps() const
Definition: ARMSubtarget.h:298
bool supportsTailCall() const
Definition: ARMSubtarget.h:399
const Triple & getTargetTriple() const
Definition: ARMSubtarget.h:330
bool hasVFP4Base() const
Definition: ARMSubtarget.h:306
unsigned getGPRAllocationOrder(const MachineFunction &MF) const
const RegisterBankInfo * getRegBankInfo() const override
unsigned MaxInterleaveFactor
Definition: ARMSubtarget.h:161
const ARMBaseTargetMachine & TM
Definition: ARMSubtarget.h:201
bool isRClass() const
Definition: ARMSubtarget.h:378
ARMLdStMultipleTiming getLdStMultipleTiming() const
Definition: ARMSubtarget.h:451
const ARMBaseInstrInfo * getInstrInfo() const override
Definition: ARMSubtarget.h:235
bool useFPVMLx() const
Definition: ARMSubtarget.h:314
bool isCortexM85() const
Definition: ARMSubtarget.h:292
bool isThumb1Only() const
Definition: ARMSubtarget.h:375
ARMProcFamilyEnum ARMProcFamily
ARMProcFamily - ARM processor family: Cortex-A8, Cortex-A9, and others.
Definition: ARMSubtarget.h:133
bool useFPVFMx() const
Definition: ARMSubtarget.h:315
ARMArchEnum ARMArch
ARMArch - ARM architecture.
Definition: ARMSubtarget.h:139
bool isCortexM7() const
Definition: ARMSubtarget.h:291
bool hasFPARMv8Base() const
Definition: ARMSubtarget.h:307
bool isAClass() const
Definition: ARMSubtarget.h:379
bool isThumb2() const
Definition: ARMSubtarget.h:376
bool useDFAforSMS() const override
bool isReadTPSoft() const
Definition: ARMSubtarget.h:361
ARMProcClassEnum ARMProcClass
ARMProcClass - ARM processor class: None, AClass, RClass or MClass.
Definition: ARMSubtarget.h:136
MCPhysReg getFramePointerReg() const
Definition: ARMSubtarget.h:385
bool isTargetWindows() const
Definition: ARMSubtarget.h:342
bool isTargetEHABICompatible() const
Definition: ARMSubtarget.h:356
bool isCortexR5() const
Definition: ARMSubtarget.h:294
bool enableSubRegLiveness() const override
Check whether this subtarget wants to use subregister liveness.
bool isGVIndirectSymbol(const GlobalValue *GV) const
True if the GV will be accessed via an indirect symbol.
unsigned MVEVectorCostFactor
The cost factor for MVE instructions, representing the multiple beats an.
Definition: ARMSubtarget.h:180
bool hasBaseDSP() const
Definition: ARMSubtarget.h:320
const ARMTargetLowering * getTargetLowering() const override
Definition: ARMSubtarget.h:239
MCSchedModel SchedModel
SchedModel - Processor specific instruction costs.
Definition: ARMSubtarget.h:193
std::string CPUString
CPUString - String name of used CPU.
Definition: ARMSubtarget.h:159
unsigned getMispredictionPenalty() const
unsigned PreferBranchLogAlignment
What alignment is preferred for loop bodies and functions, in log2(bytes).
Definition: ARMSubtarget.h:175
Triple TargetTriple
TargetTriple - What processor and OS we're targeting.
Definition: ARMSubtarget.h:190
bool enableMachineScheduler() const override
Returns true if machine scheduler should be enabled.
bool isCortexM55() const
Definition: ARMSubtarget.h:290
bool isLikeA9() const
Definition: ARMSubtarget.h:293
bool isTargetDarwin() const
Definition: ARMSubtarget.h:335
const ARMBaseRegisterInfo * getRegisterInfo() const override
Definition: ARMSubtarget.h:247
InstrItineraryData InstrItins
Selected instruction itineraries (one entry per itinerary class.)
Definition: ARMSubtarget.h:196
bool useStride4VFPs() const
bool OptMinSize
OptMinSize - True if we're optimising for minimum code size, equal to the function attribute.
Definition: ARMSubtarget.h:184
unsigned getReturnOpcode() const
Returns the correct return opcode for the current feature set.
Definition: ARMSubtarget.h:471
bool RestrictIT
RestrictIT - If true, the subtarget disallows generation of complex IT blocks.
Definition: ARMSubtarget.h:152
Align getStackAlignment() const
getStackAlignment - Returns the minimum alignment known to hold of the stack frame on entry to the fu...
Definition: ARMSubtarget.h:440
bool isKrait() const
Definition: ARMSubtarget.h:295
bool isCortexA5() const
Definition: ARMSubtarget.h:283
bool ignoreCSRForAllocationOrder(const MachineFunction &MF, MCRegister PhysReg) const override
bool hasVFP2Base() const
Definition: ARMSubtarget.h:304
bool useAA() const override
Enable use of alias analysis during code generation (during MI scheduling, DAGCombine,...
Definition: ARMSubtarget.h:429
bool isTargetAndroid() const
Definition: ARMSubtarget.h:365
bool isROPI() const
Align stackAlignment
stackAlignment - The minimum alignment known to hold of the stack frame on entry to the function and ...
Definition: ARMSubtarget.h:156
unsigned getMaxMemcpyTPInlineSizeThreshold() const
getMaxMemcpyTPInlineSizeThreshold - Returns the maximum size that still makes it profitable to inline...
Definition: ARMSubtarget.h:221
unsigned PartialUpdateClearance
Clearance before partial register updates (in number of instructions)
Definition: ARMSubtarget.h:164
bool enableMachinePipeliner() const override
Returns true if machine pipeliner should be enabled.
bool enablePostRAMachineScheduler() const override
True for some subtargets at > -O0.
bool isTargetCOFF() const
Definition: ARMSubtarget.h:344
unsigned getMaxInlineSizeThreshold() const
getMaxInlineSizeThreshold - Returns the maximum memset / memcpy size that still makes it profitable t...
Definition: ARMSubtarget.h:213
bool isTargetGNUAEABI() const
Definition: ARMSubtarget.h:350
const ARMSelectionDAGInfo * getSelectionDAGInfo() const override
Definition: ARMSubtarget.h:231
const std::string & getCPUString() const
Definition: ARMSubtarget.h:405
InstructionSelector * getInstructionSelector() const override
unsigned getMaxInterleaveFactor() const
Definition: ARMSubtarget.h:447
bool hasVFP3Base() const
Definition: ARMSubtarget.h:305
bool isR9Reserved() const
Definition: ARMSubtarget.h:381
bool useFPVFMx64() const
Definition: ARMSubtarget.h:319
unsigned getPartialUpdateClearance() const
Definition: ARMSubtarget.h:449
bool isTargetNetBSD() const
Definition: ARMSubtarget.h:341
bool isTargetWatchOS() const
Definition: ARMSubtarget.h:337
bool isXRaySupported() const override
unsigned getPreferBranchLogAlignment() const
Definition: ARMSubtarget.h:486
const CallLowering * getCallLowering() const override
enum PushPopSplitVariation getPushPopSplitVariation(const MachineFunction &MF) const
bool hasMinSize() const
Definition: ARMSubtarget.h:374
ARMSubtarget & initializeSubtargetDependencies(StringRef CPU, StringRef FS)
initializeSubtargetDependencies - Initializes using a CPU and feature string so that we can use initi...
PushPopSplitVariation
How the push and pop instructions of callee saved general-purpose registers should be split.
Definition: ARMSubtarget.h:86
@ SplitR11WindowsSEH
When the stack frame size is not known (because of variable-sized objects or realignment),...
Definition: ARMSubtarget.h:111
@ SplitR7
R7 and LR must be adjacent, because R7 is the frame pointer, and must point to a frame record consist...
Definition: ARMSubtarget.h:102
@ SplitR11AAPCSSignRA
When generating AAPCS-compilant frame chains, R11 is the frame pointer, and must be pushed adjacent t...
Definition: ARMSubtarget.h:123
@ NoSplit
All GPRs can be pushed in a single instruction.
Definition: ARMSubtarget.h:90
bool isTargetIOS() const
Definition: ARMSubtarget.h:336
bool isGVInGOT(const GlobalValue *GV) const
Returns the constant pool modifier needed to access the GV.
bool useNEONForSinglePrecisionFP() const
Definition: ARMSubtarget.h:300
const InstrItineraryData * getInstrItineraryData() const override
getInstrItins - Return the instruction itineraries based on subtarget selection.
Definition: ARMSubtarget.h:433
bool isCortexM3() const
Definition: ARMSubtarget.h:289
bool isTargetWatchABI() const
Definition: ARMSubtarget.h:338
bool allowPositionIndependentMovt() const
Allow movt+movw for PIC global address calculation.
Definition: ARMSubtarget.h:482
bool isCortexA8() const
Definition: ARMSubtarget.h:285
bool UseMulOps
UseMulOps - True if non-microcoded fused integer multiply-add and multiply-subtract instructions shou...
Definition: ARMSubtarget.h:143
const TargetOptions & Options
Options passed via command line that could influence the target.
Definition: ARMSubtarget.h:199
ARMLdStMultipleTiming
What kind of timing do load multiple/store multiple instructions have.
Definition: ARMSubtarget.h:71
@ DoubleIssueCheckUnalignedAccess
Can load/store 2 registers/cycle, but needs an extra cycle if the access is not 64-bit aligned.
Definition: ARMSubtarget.h:76
@ SingleIssue
Can load/store 1 register/cycle.
Definition: ARMSubtarget.h:78
@ DoubleIssue
Can load/store 2 registers/cycle.
Definition: ARMSubtarget.h:73
@ SingleIssuePlusExtras
Can load/store 1 register/cycle, but needs an extra cycle for address computation and potentially als...
Definition: ARMSubtarget.h:81
void ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS)
ParseSubtargetFeatures - Parses features string setting specified subtarget options.
bool hasAnyDataBarrier() const
Definition: ARMSubtarget.h:309
bool useMachinePipeliner() const
Definition: ARMSubtarget.h:373
bool isTargetDriverKit() const
Definition: ARMSubtarget.h:339
int getPreISelOperandLatencyAdjustment() const
Definition: ARMSubtarget.h:455
bool useMachineScheduler() const
Definition: ARMSubtarget.h:372
bool isCortexA15() const
Definition: ARMSubtarget.h:287
bool isRWPI() const
bool isLittle() const
Definition: ARMSubtarget.h:407
bool allowsUnalignedMem() const
Definition: ARMSubtarget.h:401
bool isTargetMuslAEABI() const
Definition: ARMSubtarget.h:352
const LegalizerInfo * getLegalizerInfo() const override
bool isTargetLinux() const
Definition: ARMSubtarget.h:340
bool isCortexA9() const
Definition: ARMSubtarget.h:286
bool useFPVFMx16() const
Definition: ARMSubtarget.h:318
bool isMClass() const
Definition: ARMSubtarget.h:377
bool SupportsTailCall
SupportsTailCall - True if the OS supports tail call.
Definition: ARMSubtarget.h:148
int PreISelOperandLatencyAdjustment
The adjustment that we need to apply to get the operand latency from the operand cycle returned by th...
Definition: ARMSubtarget.h:172
bool useMulOps() const
Definition: ARMSubtarget.h:313
bool isTargetELF() const
Definition: ARMSubtarget.h:345
bool restrictIT() const
Definition: ARMSubtarget.h:403
unsigned getMVEVectorCostFactor(TargetTransformInfo::TargetCostKind CostKind) const
Definition: ARMSubtarget.h:491
const ARMFrameLowering * getFrameLowering() const override
Definition: ARMSubtarget.h:243
Align getDualLoadStoreAlignment() const
Definition: ARMSubtarget.h:443
Itinerary data supplied by a subtarget to be used by a target.
Wrapper class representing physical registers. Should be passed by value.
Definition: MCRegister.h:33
Holds all the information related to register banks.
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:55
TargetCostKind
The kind of cost model.
@ TCK_CodeSize
Instruction code size.
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:47
bool isWatchABI() const
Definition: Triple.h:586
bool isDriverKit() const
Is this an Apple DriverKit triple.
Definition: Triple.h:597
bool isTargetEHABICompatible() const
Tests whether the target supports the EHABI exception handling standard.
Definition: Triple.h:917
bool isOSNetBSD() const
Definition: Triple.h:627
bool isAndroid() const
Tests whether the target is Android.
Definition: Triple.h:816
bool isOSBinFormatMachO() const
Tests whether the environment is MachO.
Definition: Triple.h:779
bool isTargetGNUAEABI() const
Definition: Triple.h:944
bool isOSBinFormatCOFF() const
Tests whether the OS uses the COFF binary format.
Definition: Triple.h:771
bool isOSWindows() const
Tests whether the OS is Windows.
Definition: Triple.h:676
bool isTargetMuslAEABI() const
Definition: Triple.h:952
bool isOSLinux() const
Tests whether the OS is Linux.
Definition: Triple.h:725
bool isOSDarwin() const
Is this a "Darwin" OS (macOS, iOS, tvOS, watchOS, DriverKit, XROS, or bridgeOS).
Definition: Triple.h:608
bool isWatchOS() const
Is this an Apple watchOS triple.
Definition: Triple.h:582
bool isiOS() const
Is this an iOS triple.
Definition: Triple.h:572
bool isTargetAEABI() const
Definition: Triple.h:938
bool isOSBinFormatELF() const
Tests whether the OS uses the ELF binary format.
Definition: Triple.h:766
@ Swift
Calling convention for Swift.
Definition: CallingConv.h:69
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition: Alignment.h:39
Machine model for scheduling, bundling, and heuristics.
Definition: MCSchedule.h:258