LLVM 17.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 <memory>
36#include <string>
37
38#define GET_SUBTARGETINFO_HEADER
39#include "ARMGenSubtargetInfo.inc"
40
41namespace llvm {
42
43class ARMBaseTargetMachine;
44class GlobalValue;
45class StringRef;
46
48protected:
51
87 Swift
88 };
91
94 RClass
95 };
133 };
134
135public:
136 /// What kind of timing do load multiple/store multiple instructions have.
138 /// Can load/store 2 registers/cycle.
140 /// Can load/store 2 registers/cycle, but needs an extra cycle if the access
141 /// is not 64-bit aligned.
143 /// Can load/store 1 register/cycle.
145 /// Can load/store 1 register/cycle, but needs an extra cycle for address
146 /// computation and potentially also for register writeback.
148 };
149
150protected:
151// Bool members corresponding to the SubtargetFeatures defined in tablegen
152#define GET_SUBTARGETINFO_MACRO(ATTRIBUTE, DEFAULT, GETTER) \
153 bool ATTRIBUTE = DEFAULT;
154#include "ARMGenSubtargetInfo.inc"
155
156 /// ARMProcFamily - ARM processor family: Cortex-A8, Cortex-A9, and others.
158
159 /// ARMProcClass - ARM processor class: None, AClass, RClass or MClass.
161
162 /// ARMArch - ARM architecture
164
165 /// UseMulOps - True if non-microcoded fused integer multiply-add and
166 /// multiply-subtract instructions should be used.
167 bool UseMulOps = false;
168
169 /// SupportsTailCall - True if the OS supports tail call. The dynamic linker
170 /// must be able to synthesize call stubs for interworking between ARM and
171 /// Thumb.
172 bool SupportsTailCall = false;
173
174 /// RestrictIT - If true, the subtarget disallows generation of complex IT
175 /// blocks.
176 bool RestrictIT = false;
177
178 /// UseSjLjEH - If true, the target uses SjLj exception handling (e.g. iOS).
179 bool UseSjLjEH = false;
180
181 /// stackAlignment - The minimum alignment known to hold of the stack frame on
182 /// entry to the function and which must be maintained by every function.
184
185 /// CPUString - String name of used CPU.
186 std::string CPUString;
187
189
190 /// Clearance before partial register updates (in number of instructions)
192
193 /// What kind of timing do load multiple/store multiple have (double issue,
194 /// single issue etc).
196
197 /// The adjustment that we need to apply to get the operand latency from the
198 /// operand cycle returned by the itinerary data for pre-ISel operands.
200
201 /// What alignment is preferred for loop bodies, in log2(bytes).
203
204 /// The cost factor for MVE instructions, representing the multiple beats an
205 // instruction can take. The default is 2, (set in initSubtargetFeatures so
206 // that we can use subtarget features less than 2).
208
209 /// OptMinSize - True if we're optimising for minimum code size, equal to
210 /// the function attribute.
211 bool OptMinSize = false;
212
213 /// IsLittle - The target is Little Endian
215
216 /// TargetTriple - What processor and OS we're targeting.
218
219 /// SchedModel - Processor specific instruction costs.
221
222 /// Selected instruction itineraries (one entry per itinerary class.)
224
225 /// Options passed via command line that could influence the target
227
229
230public:
231 /// This constructor initializes the data members to match that
232 /// of the specified triple.
233 ///
234 ARMSubtarget(const Triple &TT, const std::string &CPU, const std::string &FS,
235 const ARMBaseTargetMachine &TM, bool IsLittle,
236 bool MinSize = false);
237
238 /// getMaxInlineSizeThreshold - Returns the maximum memset / memcpy size
239 /// that still makes it profitable to inline the call.
240 unsigned getMaxInlineSizeThreshold() const {
241 return 64;
242 }
243
244 /// getMaxMemcpyTPInlineSizeThreshold - Returns the maximum size
245 /// that still makes it profitable to inline a llvm.memcpy as a Tail
246 /// Predicated loop.
247 /// This threshold should only be used for constant size inputs.
248 unsigned getMaxMemcpyTPInlineSizeThreshold() const { return 128; }
249
250 /// ParseSubtargetFeatures - Parses features string setting specified
251 /// subtarget options. Definition of function is auto generated by tblgen.
253
254 /// initializeSubtargetDependencies - Initializes using a CPU and feature string
255 /// so that we can use initializer lists for subtarget initialization.
257
258 const ARMSelectionDAGInfo *getSelectionDAGInfo() const override {
259 return &TSInfo;
260 }
261
262 const ARMBaseInstrInfo *getInstrInfo() const override {
263 return InstrInfo.get();
264 }
265
266 const ARMTargetLowering *getTargetLowering() const override {
267 return &TLInfo;
268 }
269
270 const ARMFrameLowering *getFrameLowering() const override {
271 return FrameLowering.get();
272 }
273
274 const ARMBaseRegisterInfo *getRegisterInfo() const override {
275 return &InstrInfo->getRegisterInfo();
276 }
277
278 const CallLowering *getCallLowering() const override;
280 const LegalizerInfo *getLegalizerInfo() const override;
281 const RegisterBankInfo *getRegBankInfo() const override;
282
283private:
284 ARMSelectionDAGInfo TSInfo;
285 // Either Thumb1FrameLowering or ARMFrameLowering.
286 std::unique_ptr<ARMFrameLowering> FrameLowering;
287 // Either Thumb1InstrInfo or Thumb2InstrInfo.
288 std::unique_ptr<ARMBaseInstrInfo> InstrInfo;
289 ARMTargetLowering TLInfo;
290
291 /// GlobalISel related APIs.
292 std::unique_ptr<CallLowering> CallLoweringInfo;
293 std::unique_ptr<InstructionSelector> InstSelector;
294 std::unique_ptr<LegalizerInfo> Legalizer;
295 std::unique_ptr<RegisterBankInfo> RegBankInfo;
296
297 void initializeEnvironment();
298 void initSubtargetFeatures(StringRef CPU, StringRef FS);
299 ARMFrameLowering *initializeFrameLowering(StringRef CPU, StringRef FS);
300
301 std::bitset<8> CoprocCDE = {};
302public:
303// Getters for SubtargetFeatures defined in tablegen
304#define GET_SUBTARGETINFO_MACRO(ATTRIBUTE, DEFAULT, GETTER) \
305 bool GETTER() const { return ATTRIBUTE; }
306#include "ARMGenSubtargetInfo.inc"
307
308 /// @{
309 /// These functions are obsolete, please consider adding subtarget features
310 /// or properties instead of calling them.
311 bool isCortexA5() const { return ARMProcFamily == CortexA5; }
312 bool isCortexA7() const { return ARMProcFamily == CortexA7; }
313 bool isCortexA8() const { return ARMProcFamily == CortexA8; }
314 bool isCortexA9() const { return ARMProcFamily == CortexA9; }
315 bool isCortexA15() const { return ARMProcFamily == CortexA15; }
316 bool isSwift() const { return ARMProcFamily == Swift; }
317 bool isCortexM3() const { return ARMProcFamily == CortexM3; }
318 bool isCortexM7() const { return ARMProcFamily == CortexM7; }
319 bool isLikeA9() const { return isCortexA9() || isCortexA15() || isKrait(); }
320 bool isCortexR5() const { return ARMProcFamily == CortexR5; }
321 bool isKrait() const { return ARMProcFamily == Krait; }
322 /// @}
323
324 bool hasARMOps() const { return !NoARM; }
325
327 return hasNEON() && hasNEONForFP();
328 }
329
330 bool hasVFP2Base() const { return hasVFPv2SP(); }
331 bool hasVFP3Base() const { return hasVFPv3D16SP(); }
332 bool hasVFP4Base() const { return hasVFPv4D16SP(); }
333 bool hasFPARMv8Base() const { return hasFPARMv8D16SP(); }
334
335 bool hasAnyDataBarrier() const {
336 return HasDataBarrier || (hasV6Ops() && !isThumb());
337 }
338
339 bool useMulOps() const { return UseMulOps; }
340 bool useFPVMLx() const { return !SlowFPVMLx; }
341 bool useFPVFMx() const {
342 return !isTargetDarwin() && hasVFP4Base() && !SlowFPVFMx;
343 }
344 bool useFPVFMx16() const { return useFPVFMx() && hasFullFP16(); }
345 bool useFPVFMx64() const { return useFPVFMx() && hasFP64(); }
346 bool useSjLjEH() const { return UseSjLjEH; }
347 bool hasBaseDSP() const {
348 if (isThumb())
349 return hasThumb2() && hasDSP();
350 else
351 return hasV5TEOps();
352 }
353
354 /// Return true if the CPU supports any kind of instruction fusion.
355 bool hasFusion() const { return hasFuseAES() || hasFuseLiterals(); }
356
357 const Triple &getTargetTriple() const { return TargetTriple; }
358
359 bool isTargetDarwin() const { return TargetTriple.isOSDarwin(); }
360 bool isTargetIOS() const { return TargetTriple.isiOS(); }
361 bool isTargetWatchOS() const { return TargetTriple.isWatchOS(); }
362 bool isTargetWatchABI() const { return TargetTriple.isWatchABI(); }
363 bool isTargetDriverKit() const { return TargetTriple.isDriverKit(); }
364 bool isTargetLinux() const { return TargetTriple.isOSLinux(); }
365 bool isTargetNaCl() const { return TargetTriple.isOSNaCl(); }
366 bool isTargetNetBSD() const { return TargetTriple.isOSNetBSD(); }
367 bool isTargetWindows() const { return TargetTriple.isOSWindows(); }
368
369 bool isTargetCOFF() const { return TargetTriple.isOSBinFormatCOFF(); }
370 bool isTargetELF() const { return TargetTriple.isOSBinFormatELF(); }
372
373 // ARM EABI is the bare-metal EABI described in ARM ABI documents and
374 // can be accessed via -target arm-none-eabi. This is NOT GNUEABI.
375 // FIXME: Add a flag for bare-metal for that target and set Triple::EABI
376 // even for GNUEABI, so we can make a distinction here and still conform to
377 // the EABI on GNU (and Android) mode. This requires change in Clang, too.
378 // FIXME: The Darwin exception is temporary, while we move users to
379 // "*-*-*-macho" triples as quickly as possible.
380 bool isTargetAEABI() const {
384 }
385 bool isTargetGNUAEABI() const {
389 }
390 bool isTargetMuslAEABI() const {
395 }
396
397 // ARM Targets that support EHABI exception handling standard
398 // Darwin uses SjLj. Other targets might need more checks.
401 }
402
403 bool isTargetHardFloat() const;
404
405 bool isTargetAndroid() const { return TargetTriple.isAndroid(); }
406
407 bool isXRaySupported() const override;
408
409 bool isAPCS_ABI() const;
410 bool isAAPCS_ABI() const;
411 bool isAAPCS16_ABI() const;
412
413 bool isROPI() const;
414 bool isRWPI() const;
415
416 bool useMachineScheduler() const { return UseMISched; }
417 bool useMachinePipeliner() const { return UseMIPipeliner; }
418 bool hasMinSize() const { return OptMinSize; }
419 bool isThumb1Only() const { return isThumb() && !hasThumb2(); }
420 bool isThumb2() const { return isThumb() && hasThumb2(); }
421 bool isMClass() const { return ARMProcClass == MClass; }
422 bool isRClass() const { return ARMProcClass == RClass; }
423 bool isAClass() const { return ARMProcClass == AClass; }
424
425 bool isR9Reserved() const {
426 return isTargetMachO() ? (ReserveR9 || !HasV6Ops) : ReserveR9;
427 }
428
430 if (isTargetDarwin() ||
431 (!isTargetWindows() && isThumb() && !createAAPCSFrameChain()))
432 return ARM::R7;
433 return ARM::R11;
434 }
435
436 /// Returns true if the frame setup is split into two separate pushes (first
437 /// r0-r7,lr then r8-r11), principally so that the frame pointer is adjacent
438 /// to lr. This is always required on Thumb1-only targets, as the push and
439 /// pop instructions can't access the high registers.
440 bool splitFramePushPop(const MachineFunction &MF) const {
442 return true;
443 return (getFramePointerReg() == ARM::R7 &&
445 isThumb1Only();
446 }
447
448 bool splitFramePointerPush(const MachineFunction &MF) const;
449
450 bool useStride4VFPs() const;
451
452 bool useMovt() const;
453
454 bool supportsTailCall() const { return SupportsTailCall; }
455
456 bool allowsUnalignedMem() const { return !StrictAlign; }
457
458 bool restrictIT() const { return RestrictIT; }
459
460 const std::string & getCPUString() const { return CPUString; }
461
462 bool isLittle() const { return IsLittle; }
463
464 unsigned getMispredictionPenalty() const;
465
466 /// Returns true if machine scheduler should be enabled.
467 bool enableMachineScheduler() const override;
468
469 /// Returns true if machine pipeliner should be enabled.
470 bool enableMachinePipeliner() const override;
471 bool useDFAforSMS() const override;
472
473 /// True for some subtargets at > -O0.
474 bool enablePostRAScheduler() const override;
475
476 /// True for some subtargets at > -O0.
477 bool enablePostRAMachineScheduler() const override;
478
479 /// Check whether this subtarget wants to use subregister liveness.
480 bool enableSubRegLiveness() const override;
481
482 /// Enable use of alias analysis during code generation (during MI
483 /// scheduling, DAGCombine, etc.).
484 bool useAA() const override { return true; }
485
486 /// getInstrItins - Return the instruction itineraries based on subtarget
487 /// selection.
489 return &InstrItins;
490 }
491
492 /// getStackAlignment - Returns the minimum alignment known to hold of the
493 /// stack frame on entry to the function and which must be maintained by every
494 /// function for this subtarget.
496
497 unsigned getMaxInterleaveFactor() const { return MaxInterleaveFactor; }
498
500
502 return LdStMultipleTiming;
503 }
504
507 }
508
509 /// True if the GV will be accessed via an indirect symbol.
510 bool isGVIndirectSymbol(const GlobalValue *GV) const;
511
512 /// Returns the constant pool modifier needed to access the GV.
513 bool isGVInGOT(const GlobalValue *GV) const;
514
515 /// True if fast-isel is used.
516 bool useFastISel() const;
517
518 /// Returns the correct return opcode for the current feature set.
519 /// Use BX if available to allow mixing thumb/arm code, but fall back
520 /// to plain mov pc,lr on ARMv4.
521 unsigned getReturnOpcode() const {
522 if (isThumb())
523 return ARM::tBX_RET;
524 if (hasV4TOps())
525 return ARM::BX_RET;
526 return ARM::MOVPCLR;
527 }
528
529 /// Allow movt+movw for PIC global address calculation.
530 /// ELF does not have GOT relocations for movt+movw.
531 /// ROPI does not use GOT.
533 return isROPI() || !isTargetELF();
534 }
535
537
538 unsigned
541 return 1;
542 return MVEVectorCostFactor;
543 }
544
546 unsigned PhysReg) const override;
547 unsigned getGPRAllocationOrder(const MachineFunction &MF) const;
548};
549
550} // end namespace llvm
551
552#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< TargetTransformInfo::TargetCostKind > CostKind("cost-kind", cl::desc("Target cost kind"), cl::init(TargetTransformInfo::TCK_RecipThroughput), cl::values(clEnumValN(TargetTransformInfo::TCK_RecipThroughput, "throughput", "Reciprocal throughput"), clEnumValN(TargetTransformInfo::TCK_Latency, "latency", "Instruction latency"), clEnumValN(TargetTransformInfo::TCK_CodeSize, "code-size", "Code size"), clEnumValN(TargetTransformInfo::TCK_SizeAndLatency, "size-latency", "Code size and latency")))
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.
ARMFunctionInfo - This class is derived from MachineFunctionInfo and contains private ARM-specific in...
bool useFastISel() const
True if fast-isel is used.
bool isTargetMachO() const
Definition: ARMSubtarget.h:371
bool hasFusion() const
Return true if the CPU supports any kind of instruction fusion.
Definition: ARMSubtarget.h:355
bool isCortexA7() const
Definition: ARMSubtarget.h:312
bool IsLittle
IsLittle - The target is Little Endian.
Definition: ARMSubtarget.h:214
bool useMovt() const
bool isSwift() const
Definition: ARMSubtarget.h:316
bool isTargetAEABI() const
Definition: ARMSubtarget.h:380
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:195
bool hasARMOps() const
Definition: ARMSubtarget.h:324
bool supportsTailCall() const
Definition: ARMSubtarget.h:454
const Triple & getTargetTriple() const
Definition: ARMSubtarget.h:357
bool UseSjLjEH
UseSjLjEH - If true, the target uses SjLj exception handling (e.g. iOS).
Definition: ARMSubtarget.h:179
bool hasVFP4Base() const
Definition: ARMSubtarget.h:332
unsigned getGPRAllocationOrder(const MachineFunction &MF) const
const RegisterBankInfo * getRegBankInfo() const override
unsigned MaxInterleaveFactor
Definition: ARMSubtarget.h:188
const ARMBaseTargetMachine & TM
Definition: ARMSubtarget.h:228
bool isRClass() const
Definition: ARMSubtarget.h:422
ARMLdStMultipleTiming getLdStMultipleTiming() const
Definition: ARMSubtarget.h:501
const ARMBaseInstrInfo * getInstrInfo() const override
Definition: ARMSubtarget.h:262
bool useFPVMLx() const
Definition: ARMSubtarget.h:340
bool isThumb1Only() const
Definition: ARMSubtarget.h:419
ARMProcFamilyEnum ARMProcFamily
ARMProcFamily - ARM processor family: Cortex-A8, Cortex-A9, and others.
Definition: ARMSubtarget.h:157
bool useFPVFMx() const
Definition: ARMSubtarget.h:341
ARMArchEnum ARMArch
ARMArch - ARM architecture.
Definition: ARMSubtarget.h:163
bool isCortexM7() const
Definition: ARMSubtarget.h:318
bool hasFPARMv8Base() const
Definition: ARMSubtarget.h:333
bool isAClass() const
Definition: ARMSubtarget.h:423
bool isThumb2() const
Definition: ARMSubtarget.h:420
bool useDFAforSMS() const override
ARMProcClassEnum ARMProcClass
ARMProcClass - ARM processor class: None, AClass, RClass or MClass.
Definition: ARMSubtarget.h:160
bool ignoreCSRForAllocationOrder(const MachineFunction &MF, unsigned PhysReg) const override
bool isAAPCS16_ABI() const
MCPhysReg getFramePointerReg() const
Definition: ARMSubtarget.h:429
bool isTargetWindows() const
Definition: ARMSubtarget.h:367
bool isTargetEHABICompatible() const
Definition: ARMSubtarget.h:399
bool isCortexR5() const
Definition: ARMSubtarget.h:320
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:207
bool hasBaseDSP() const
Definition: ARMSubtarget.h:347
const ARMTargetLowering * getTargetLowering() const override
Definition: ARMSubtarget.h:266
bool useSjLjEH() const
Definition: ARMSubtarget.h:346
MCSchedModel SchedModel
SchedModel - Processor specific instruction costs.
Definition: ARMSubtarget.h:220
std::string CPUString
CPUString - String name of used CPU.
Definition: ARMSubtarget.h:186
unsigned getMispredictionPenalty() const
Triple TargetTriple
TargetTriple - What processor and OS we're targeting.
Definition: ARMSubtarget.h:217
bool enableMachineScheduler() const override
Returns true if machine scheduler should be enabled.
bool isLikeA9() const
Definition: ARMSubtarget.h:319
bool isTargetDarwin() const
Definition: ARMSubtarget.h:359
const ARMBaseRegisterInfo * getRegisterInfo() const override
Definition: ARMSubtarget.h:274
InstrItineraryData InstrItins
Selected instruction itineraries (one entry per itinerary class.)
Definition: ARMSubtarget.h:223
bool useStride4VFPs() const
bool OptMinSize
OptMinSize - True if we're optimising for minimum code size, equal to the function attribute.
Definition: ARMSubtarget.h:211
unsigned getReturnOpcode() const
Returns the correct return opcode for the current feature set.
Definition: ARMSubtarget.h:521
bool RestrictIT
RestrictIT - If true, the subtarget disallows generation of complex IT blocks.
Definition: ARMSubtarget.h:176
Align getStackAlignment() const
getStackAlignment - Returns the minimum alignment known to hold of the stack frame on entry to the fu...
Definition: ARMSubtarget.h:495
bool isKrait() const
Definition: ARMSubtarget.h:321
bool isCortexA5() const
Definition: ARMSubtarget.h:311
bool hasVFP2Base() const
Definition: ARMSubtarget.h:330
unsigned PrefLoopLogAlignment
What alignment is preferred for loop bodies, in log2(bytes).
Definition: ARMSubtarget.h:202
bool useAA() const override
Enable use of alias analysis during code generation (during MI scheduling, DAGCombine,...
Definition: ARMSubtarget.h:484
bool isTargetAndroid() const
Definition: ARMSubtarget.h:405
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:183
unsigned getMaxMemcpyTPInlineSizeThreshold() const
getMaxMemcpyTPInlineSizeThreshold - Returns the maximum size that still makes it profitable to inline...
Definition: ARMSubtarget.h:248
unsigned PartialUpdateClearance
Clearance before partial register updates (in number of instructions)
Definition: ARMSubtarget.h:191
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:369
bool splitFramePushPop(const MachineFunction &MF) const
Returns true if the frame setup is split into two separate pushes (first r0-r7,lr then r8-r11),...
Definition: ARMSubtarget.h:440
unsigned getMaxInlineSizeThreshold() const
getMaxInlineSizeThreshold - Returns the maximum memset / memcpy size that still makes it profitable t...
Definition: ARMSubtarget.h:240
bool isTargetGNUAEABI() const
Definition: ARMSubtarget.h:385
const ARMSelectionDAGInfo * getSelectionDAGInfo() const override
Definition: ARMSubtarget.h:258
const std::string & getCPUString() const
Definition: ARMSubtarget.h:460
InstructionSelector * getInstructionSelector() const override
unsigned getMaxInterleaveFactor() const
Definition: ARMSubtarget.h:497
bool hasVFP3Base() const
Definition: ARMSubtarget.h:331
bool isR9Reserved() const
Definition: ARMSubtarget.h:425
bool isAPCS_ABI() const
bool useFPVFMx64() const
Definition: ARMSubtarget.h:345
unsigned getPartialUpdateClearance() const
Definition: ARMSubtarget.h:499
bool isTargetNetBSD() const
Definition: ARMSubtarget.h:366
bool isTargetWatchOS() const
Definition: ARMSubtarget.h:361
bool isXRaySupported() const override
const CallLowering * getCallLowering() const override
bool hasMinSize() const
Definition: ARMSubtarget.h:418
bool splitFramePointerPush(const MachineFunction &MF) const
ARMSubtarget & initializeSubtargetDependencies(StringRef CPU, StringRef FS)
initializeSubtargetDependencies - Initializes using a CPU and feature string so that we can use initi...
bool isTargetIOS() const
Definition: ARMSubtarget.h:360
bool isGVInGOT(const GlobalValue *GV) const
Returns the constant pool modifier needed to access the GV.
bool useNEONForSinglePrecisionFP() const
Definition: ARMSubtarget.h:326
bool isTargetNaCl() const
Definition: ARMSubtarget.h:365
const InstrItineraryData * getInstrItineraryData() const override
getInstrItins - Return the instruction itineraries based on subtarget selection.
Definition: ARMSubtarget.h:488
bool isCortexM3() const
Definition: ARMSubtarget.h:317
bool isTargetWatchABI() const
Definition: ARMSubtarget.h:362
bool allowPositionIndependentMovt() const
Allow movt+movw for PIC global address calculation.
Definition: ARMSubtarget.h:532
bool isCortexA8() const
Definition: ARMSubtarget.h:313
bool UseMulOps
UseMulOps - True if non-microcoded fused integer multiply-add and multiply-subtract instructions shou...
Definition: ARMSubtarget.h:167
const TargetOptions & Options
Options passed via command line that could influence the target.
Definition: ARMSubtarget.h:226
ARMLdStMultipleTiming
What kind of timing do load multiple/store multiple instructions have.
Definition: ARMSubtarget.h:137
@ DoubleIssueCheckUnalignedAccess
Can load/store 2 registers/cycle, but needs an extra cycle if the access is not 64-bit aligned.
Definition: ARMSubtarget.h:142
@ SingleIssue
Can load/store 1 register/cycle.
Definition: ARMSubtarget.h:144
@ DoubleIssue
Can load/store 2 registers/cycle.
Definition: ARMSubtarget.h:139
@ SingleIssuePlusExtras
Can load/store 1 register/cycle, but needs an extra cycle for address computation and potentially als...
Definition: ARMSubtarget.h:147
void ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS)
ParseSubtargetFeatures - Parses features string setting specified subtarget options.
bool hasAnyDataBarrier() const
Definition: ARMSubtarget.h:335
bool useMachinePipeliner() const
Definition: ARMSubtarget.h:417
bool isTargetDriverKit() const
Definition: ARMSubtarget.h:363
int getPreISelOperandLatencyAdjustment() const
Definition: ARMSubtarget.h:505
bool isAAPCS_ABI() const
bool useMachineScheduler() const
Definition: ARMSubtarget.h:416
bool isCortexA15() const
Definition: ARMSubtarget.h:315
bool isRWPI() const
bool isLittle() const
Definition: ARMSubtarget.h:462
bool allowsUnalignedMem() const
Definition: ARMSubtarget.h:456
bool isTargetMuslAEABI() const
Definition: ARMSubtarget.h:390
const LegalizerInfo * getLegalizerInfo() const override
bool isTargetLinux() const
Definition: ARMSubtarget.h:364
bool isCortexA9() const
Definition: ARMSubtarget.h:314
bool useFPVFMx16() const
Definition: ARMSubtarget.h:344
bool isMClass() const
Definition: ARMSubtarget.h:421
bool SupportsTailCall
SupportsTailCall - True if the OS supports tail call.
Definition: ARMSubtarget.h:172
unsigned getPrefLoopLogAlignment() const
Definition: ARMSubtarget.h:536
int PreISelOperandLatencyAdjustment
The adjustment that we need to apply to get the operand latency from the operand cycle returned by th...
Definition: ARMSubtarget.h:199
bool isTargetHardFloat() const
bool useMulOps() const
Definition: ARMSubtarget.h:339
bool isTargetELF() const
Definition: ARMSubtarget.h:370
bool restrictIT() const
Definition: ARMSubtarget.h:458
unsigned getMVEVectorCostFactor(TargetTransformInfo::TargetCostKind CostKind) const
Definition: ARMSubtarget.h:539
const ARMFrameLowering * getFrameLowering() const override
Definition: ARMSubtarget.h:270
Itinerary data supplied by a subtarget to be used by a target.
Provides the logic to select generic machine instructions.
const LLVMTargetMachine & getTarget() const
getTarget - Return the target machine this machine code is compiled with
Ty * getInfo()
getInfo - Keep track of various per-function pieces of information for backends that would like to do...
Holds all the information related to register banks.
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
TargetOptions Options
bool DisableFramePointerElim(const MachineFunction &MF) const
DisableFramePointerElim - This returns true if frame pointer elimination optimization should be disab...
TargetCostKind
The kind of cost model.
@ TCK_CodeSize
Instruction code size.
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
bool isOSNaCl() const
Tests whether the OS is NaCl (Native Client)
Definition: Triple.h:633
bool isWatchABI() const
Definition: Triple.h:509
@ MuslEABIHF
Definition: Triple.h:248
bool isDriverKit() const
Is this an Apple DriverKit triple.
Definition: Triple.h:514
bool isTargetEHABICompatible() const
Tests whether the target supports the EHABI exception handling standard.
Definition: Triple.h:795
bool isOSNetBSD() const
Definition: Triple.h:537
bool isAndroid() const
Tests whether the target is Android.
Definition: Triple.h:725
bool isOSBinFormatMachO() const
Tests whether the environment is MachO.
Definition: Triple.h:688
bool isOSBinFormatCOFF() const
Tests whether the OS uses the COFF binary format.
Definition: Triple.h:680
EnvironmentType getEnvironment() const
Get the parsed environment type of this triple.
Definition: Triple.h:373
bool isOSWindows() const
Tests whether the OS is Windows.
Definition: Triple.h:584
bool isOSLinux() const
Tests whether the OS is Linux.
Definition: Triple.h:638
bool isOSDarwin() const
Is this a "Darwin" OS (macOS, iOS, tvOS, watchOS, or DriverKit).
Definition: Triple.h:519
bool isWatchOS() const
Is this an Apple watchOS triple.
Definition: Triple.h:505
bool isiOS() const
Is this an iOS triple.
Definition: Triple.h:495
bool isOSBinFormatELF() const
Tests whether the OS uses the ELF binary format.
Definition: Triple.h:675
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:249