clang  14.0.0git
TargetInfo.h
Go to the documentation of this file.
1 //===--- TargetInfo.h - Expose information about the target -----*- 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 /// \file
10 /// Defines the clang::TargetInfo interface.
11 ///
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_CLANG_BASIC_TARGETINFO_H
15 #define LLVM_CLANG_BASIC_TARGETINFO_H
16 
19 #include "clang/Basic/LLVM.h"
21 #include "clang/Basic/Specifiers.h"
24 #include "llvm/ADT/APFloat.h"
25 #include "llvm/ADT/APInt.h"
26 #include "llvm/ADT/ArrayRef.h"
27 #include "llvm/ADT/IntrusiveRefCntPtr.h"
28 #include "llvm/ADT/Optional.h"
29 #include "llvm/ADT/SmallSet.h"
30 #include "llvm/ADT/StringMap.h"
31 #include "llvm/ADT/StringRef.h"
32 #include "llvm/ADT/Triple.h"
33 #include "llvm/Frontend/OpenMP/OMPGridValues.h"
34 #include "llvm/Support/DataTypes.h"
35 #include "llvm/Support/Error.h"
36 #include "llvm/Support/VersionTuple.h"
37 #include <cassert>
38 #include <string>
39 #include <vector>
40 
41 namespace llvm {
42 struct fltSemantics;
43 }
44 
45 namespace clang {
46 class DiagnosticsEngine;
47 class LangOptions;
48 class CodeGenOptions;
49 class MacroBuilder;
50 class QualType;
51 class SourceLocation;
52 class SourceManager;
53 
54 namespace Builtin { struct Info; }
55 
56 /// Fields controlling how types are laid out in memory; these may need to
57 /// be copied for targets like AMDGPU that base their ABIs on an auxiliary
58 /// CPU target.
60  unsigned char PointerWidth, PointerAlign;
61  unsigned char BoolWidth, BoolAlign;
62  unsigned char IntWidth, IntAlign;
63  unsigned char HalfWidth, HalfAlign;
64  unsigned char BFloat16Width, BFloat16Align;
65  unsigned char FloatWidth, FloatAlign;
66  unsigned char DoubleWidth, DoubleAlign;
69  unsigned char LongWidth, LongAlign;
70  unsigned char LongLongWidth, LongLongAlign;
71 
72  // Fixed point bit widths
74  unsigned char AccumWidth, AccumAlign;
77  unsigned char FractWidth, FractAlign;
79 
80  // If true, unsigned fixed point types have the same number of fractional bits
81  // as their signed counterparts, forcing the unsigned types to have one extra
82  // bit of padding. Otherwise, unsigned fixed point types have
83  // one more fractional bit than its corresponding signed type. This is false
84  // by default.
86 
87  // Fixed point integral and fractional bit sizes
88  // Saturated types share the same integral/fractional bits as their
89  // corresponding unsaturated types.
90  // For simplicity, the fractional bits in a _Fract type will be one less the
91  // width of that _Fract type. This leaves all signed _Fract types having no
92  // padding and unsigned _Fract types will only have 1 bit of padding after the
93  // sign if PaddingOnUnsignedFixedPoint is set.
94  unsigned char ShortAccumScale;
95  unsigned char AccumScale;
96  unsigned char LongAccumScale;
97 
98  unsigned char SuitableAlign;
100  unsigned char MinGlobalAlign;
101 
102  unsigned short NewAlign;
103  unsigned MaxVectorAlign;
104  unsigned MaxTLSAlign;
105 
106  const llvm::fltSemantics *HalfFormat, *BFloat16Format, *FloatFormat,
108 
109  ///===---- Target Data Type Query Methods -------------------------------===//
110  enum IntType {
111  NoInt = 0,
122  };
123 
124  enum RealType {
125  NoFloat = 255,
126  Float = 0,
131  };
132 
133 protected:
137 
138  /// Whether Objective-C's built-in boolean type should be signed char.
139  ///
140  /// Otherwise, when this flag is not set, the normal built-in boolean type is
141  /// used.
143 
144  /// Control whether the alignment of bit-field types is respected when laying
145  /// out structures. If true, then the alignment of the bit-field type will be
146  /// used to (a) impact the alignment of the containing structure, and (b)
147  /// ensure that the individual bit-field will not straddle an alignment
148  /// boundary.
150 
151  /// Whether zero length bitfields (e.g., int : 0;) force alignment of
152  /// the next bitfield.
153  ///
154  /// If the alignment of the zero length bitfield is greater than the member
155  /// that follows it, `bar', `bar' will be aligned as the type of the
156  /// zero-length bitfield.
158 
159  /// Whether zero length bitfield alignment is respected if they are the
160  /// leading members.
162 
163  /// Whether explicit bit field alignment attributes are honored.
165 
166  /// If non-zero, specifies a fixed alignment value for bitfields that follow
167  /// zero length bitfield, regardless of the zero length bitfield type.
169 
170  /// If non-zero, specifies a maximum alignment to truncate alignment
171  /// specified in the aligned attribute of a static variable to this value.
173 };
174 
175 /// OpenCL type kinds.
176 enum OpenCLTypeKind : uint8_t {
185 };
186 
187 /// Exposes information about the current target.
188 ///
189 class TargetInfo : public virtual TransferrableTargetInfo,
190  public RefCountedBase<TargetInfo> {
191  std::shared_ptr<TargetOptions> TargetOpts;
192  llvm::Triple Triple;
193 protected:
194  // Target values set by the ctor of the actual target implementation. Default
195  // values are specified by the TargetInfo constructor.
196  bool BigEndian;
199  bool NoAsmVariants; // True if {|} are normal characters.
200  bool HasLegalHalfType; // True if the backend supports operations on the half
201  // LLVM IR type.
205  bool HasIbm128;
207 
209  unsigned short SimdDefaultAlign;
211  const char *UserLabelPrefix;
212  const char *MCountName;
213  unsigned char RegParmMax, SSERegParmMax;
216 
217  mutable StringRef PlatformName;
218  mutable VersionTuple PlatformMinVersion;
219 
220  unsigned HasAlignMac68kSupport : 1;
221  unsigned RealTypeUsesObjCFPRet : 3;
223 
224  unsigned HasBuiltinMSVaList : 1;
225 
226  unsigned IsRenderScriptTarget : 1;
227 
228  unsigned HasAArch64SVETypes : 1;
229 
230  unsigned HasRISCVVTypes : 1;
231 
233 
234  unsigned ARMCDECoprocMask : 8;
235 
237 
238  // TargetInfo Constructor. Default initializes all fields.
239  TargetInfo(const llvm::Triple &T);
240 
241  // UserLabelPrefix must match DL's getGlobalPrefix() when interpreted
242  // as a DataLayout object.
243  void resetDataLayout(StringRef DL, const char *UserLabelPrefix = "");
244 
245 public:
246  /// Construct a target for the given options.
247  ///
248  /// \param Opts - The options to use to initialize the target. The target may
249  /// modify the options to canonicalize the target feature information to match
250  /// what the backend expects.
251  static TargetInfo *
253  const std::shared_ptr<TargetOptions> &Opts);
254 
255  virtual ~TargetInfo();
256 
257  /// Retrieve the target options.
259  assert(TargetOpts && "Missing target options");
260  return *TargetOpts;
261  }
262 
263  /// The different kinds of __builtin_va_list types defined by
264  /// the target implementation.
266  /// typedef char* __builtin_va_list;
268 
269  /// typedef void* __builtin_va_list;
271 
272  /// __builtin_va_list as defined by the AArch64 ABI
273  /// http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055a/IHI0055A_aapcs64.pdf
275 
276  /// __builtin_va_list as defined by the PNaCl ABI:
277  /// http://www.chromium.org/nativeclient/pnacl/bitcode-abi#TOC-Machine-Types
279 
280  /// __builtin_va_list as defined by the Power ABI:
281  /// https://www.power.org
282  /// /resources/downloads/Power-Arch-32-bit-ABI-supp-1.0-Embedded.pdf
284 
285  /// __builtin_va_list as defined by the x86-64 ABI:
286  /// http://refspecs.linuxbase.org/elf/x86_64-abi-0.21.pdf
288 
289  /// __builtin_va_list as defined by ARM AAPCS ABI
290  /// http://infocenter.arm.com
291  // /help/topic/com.arm.doc.ihi0042d/IHI0042D_aapcs.pdf
293 
294  // typedef struct __va_list_tag
295  // {
296  // long __gpr;
297  // long __fpr;
298  // void *__overflow_arg_area;
299  // void *__reg_save_area;
300  // } va_list[1];
302 
303  // typedef struct __va_list_tag {
304  // void *__current_saved_reg_area_pointer;
305  // void *__saved_reg_area_end_pointer;
306  // void *__overflow_area_pointer;
307  //} va_list;
309  };
310 
311 protected:
312  /// Specify if mangling based on address space map should be used or
313  /// not for language specific address spaces
315 
316 public:
317  IntType getSizeType() const { return SizeType; }
319  switch (SizeType) {
320  case UnsignedShort:
321  return SignedShort;
322  case UnsignedInt:
323  return SignedInt;
324  case UnsignedLong:
325  return SignedLong;
326  case UnsignedLongLong:
327  return SignedLongLong;
328  default:
329  llvm_unreachable("Invalid SizeType");
330  }
331  }
332  IntType getIntMaxType() const { return IntMaxType; }
335  }
336  IntType getPtrDiffType(unsigned AddrSpace) const {
337  return AddrSpace == 0 ? PtrDiffType : getPtrDiffTypeV(AddrSpace);
338  }
339  IntType getUnsignedPtrDiffType(unsigned AddrSpace) const {
340  return getCorrespondingUnsignedType(getPtrDiffType(AddrSpace));
341  }
342  IntType getIntPtrType() const { return IntPtrType; }
345  }
346  IntType getWCharType() const { return WCharType; }
347  IntType getWIntType() const { return WIntType; }
348  IntType getChar16Type() const { return Char16Type; }
349  IntType getChar32Type() const { return Char32Type; }
350  IntType getInt64Type() const { return Int64Type; }
353  }
354  IntType getInt16Type() const { return Int16Type; }
357  }
360 
362  switch (T) {
363  case SignedChar:
364  return UnsignedChar;
365  case SignedShort:
366  return UnsignedShort;
367  case SignedInt:
368  return UnsignedInt;
369  case SignedLong:
370  return UnsignedLong;
371  case SignedLongLong:
372  return UnsignedLongLong;
373  default:
374  llvm_unreachable("Unexpected signed integer type");
375  }
376  }
377 
378  /// In the event this target uses the same number of fractional bits for its
379  /// unsigned types as it does with its signed counterparts, there will be
380  /// exactly one bit of padding.
381  /// Return true if unsigned fixed point types have padding for this target.
384  }
385 
386  /// Return the width (in bits) of the specified integer type enum.
387  ///
388  /// For example, SignedInt -> getIntWidth().
389  unsigned getTypeWidth(IntType T) const;
390 
391  /// Return integer type with specified width.
392  virtual IntType getIntTypeByWidth(unsigned BitWidth, bool IsSigned) const;
393 
394  /// Return the smallest integer type with at least the specified width.
395  virtual IntType getLeastIntTypeByWidth(unsigned BitWidth,
396  bool IsSigned) const;
397 
398  /// Return floating point type with specified width. On PPC, there are
399  /// three possible types for 128-bit floating point: "PPC double-double",
400  /// IEEE 754R quad precision, and "long double" (which under the covers
401  /// is represented as one of those two). At this time, there is no support
402  /// for an explicit "PPC double-double" type (i.e. __ibm128) so we only
403  /// need to differentiate between "long double" and IEEE quad precision.
404  RealType getRealTypeByWidth(unsigned BitWidth, bool ExplicitIEEE) const;
405 
406  /// Return the alignment (in bits) of the specified integer type enum.
407  ///
408  /// For example, SignedInt -> getIntAlign().
409  unsigned getTypeAlign(IntType T) const;
410 
411  /// Returns true if the type is signed; false otherwise.
412  static bool isTypeSigned(IntType T);
413 
414  /// Return the width of pointers on this target, for the
415  /// specified address space.
416  uint64_t getPointerWidth(unsigned AddrSpace) const {
417  return AddrSpace == 0 ? PointerWidth : getPointerWidthV(AddrSpace);
418  }
419  uint64_t getPointerAlign(unsigned AddrSpace) const {
420  return AddrSpace == 0 ? PointerAlign : getPointerAlignV(AddrSpace);
421  }
422 
423  /// Return the maximum width of pointers on this target.
424  virtual uint64_t getMaxPointerWidth() const {
425  return PointerWidth;
426  }
427 
428  /// Get integer value for null pointer.
429  /// \param AddrSpace address space of pointee in source language.
430  virtual uint64_t getNullPointerValue(LangAS AddrSpace) const { return 0; }
431 
432  /// Return the size of '_Bool' and C++ 'bool' for this target, in bits.
433  unsigned getBoolWidth() const { return BoolWidth; }
434 
435  /// Return the alignment of '_Bool' and C++ 'bool' for this target.
436  unsigned getBoolAlign() const { return BoolAlign; }
437 
438  unsigned getCharWidth() const { return 8; } // FIXME
439  unsigned getCharAlign() const { return 8; } // FIXME
440 
441  /// Return the size of 'signed short' and 'unsigned short' for this
442  /// target, in bits.
443  unsigned getShortWidth() const { return 16; } // FIXME
444 
445  /// Return the alignment of 'signed short' and 'unsigned short' for
446  /// this target.
447  unsigned getShortAlign() const { return 16; } // FIXME
448 
449  /// getIntWidth/Align - Return the size of 'signed int' and 'unsigned int' for
450  /// this target, in bits.
451  unsigned getIntWidth() const { return IntWidth; }
452  unsigned getIntAlign() const { return IntAlign; }
453 
454  /// getLongWidth/Align - Return the size of 'signed long' and 'unsigned long'
455  /// for this target, in bits.
456  unsigned getLongWidth() const { return LongWidth; }
457  unsigned getLongAlign() const { return LongAlign; }
458 
459  /// getLongLongWidth/Align - Return the size of 'signed long long' and
460  /// 'unsigned long long' for this target, in bits.
461  unsigned getLongLongWidth() const { return LongLongWidth; }
462  unsigned getLongLongAlign() const { return LongLongAlign; }
463 
464  /// getShortAccumWidth/Align - Return the size of 'signed short _Accum' and
465  /// 'unsigned short _Accum' for this target, in bits.
466  unsigned getShortAccumWidth() const { return ShortAccumWidth; }
467  unsigned getShortAccumAlign() const { return ShortAccumAlign; }
468 
469  /// getAccumWidth/Align - Return the size of 'signed _Accum' and
470  /// 'unsigned _Accum' for this target, in bits.
471  unsigned getAccumWidth() const { return AccumWidth; }
472  unsigned getAccumAlign() const { return AccumAlign; }
473 
474  /// getLongAccumWidth/Align - Return the size of 'signed long _Accum' and
475  /// 'unsigned long _Accum' for this target, in bits.
476  unsigned getLongAccumWidth() const { return LongAccumWidth; }
477  unsigned getLongAccumAlign() const { return LongAccumAlign; }
478 
479  /// getShortFractWidth/Align - Return the size of 'signed short _Fract' and
480  /// 'unsigned short _Fract' for this target, in bits.
481  unsigned getShortFractWidth() const { return ShortFractWidth; }
482  unsigned getShortFractAlign() const { return ShortFractAlign; }
483 
484  /// getFractWidth/Align - Return the size of 'signed _Fract' and
485  /// 'unsigned _Fract' for this target, in bits.
486  unsigned getFractWidth() const { return FractWidth; }
487  unsigned getFractAlign() const { return FractAlign; }
488 
489  /// getLongFractWidth/Align - Return the size of 'signed long _Fract' and
490  /// 'unsigned long _Fract' for this target, in bits.
491  unsigned getLongFractWidth() const { return LongFractWidth; }
492  unsigned getLongFractAlign() const { return LongFractAlign; }
493 
494  /// getShortAccumScale/IBits - Return the number of fractional/integral bits
495  /// in a 'signed short _Accum' type.
496  unsigned getShortAccumScale() const { return ShortAccumScale; }
497  unsigned getShortAccumIBits() const {
498  return ShortAccumWidth - ShortAccumScale - 1;
499  }
500 
501  /// getAccumScale/IBits - Return the number of fractional/integral bits
502  /// in a 'signed _Accum' type.
503  unsigned getAccumScale() const { return AccumScale; }
504  unsigned getAccumIBits() const { return AccumWidth - AccumScale - 1; }
505 
506  /// getLongAccumScale/IBits - Return the number of fractional/integral bits
507  /// in a 'signed long _Accum' type.
508  unsigned getLongAccumScale() const { return LongAccumScale; }
509  unsigned getLongAccumIBits() const {
510  return LongAccumWidth - LongAccumScale - 1;
511  }
512 
513  /// getUnsignedShortAccumScale/IBits - Return the number of
514  /// fractional/integral bits in a 'unsigned short _Accum' type.
515  unsigned getUnsignedShortAccumScale() const {
517  }
518  unsigned getUnsignedShortAccumIBits() const {
522  }
523 
524  /// getUnsignedAccumScale/IBits - Return the number of fractional/integral
525  /// bits in a 'unsigned _Accum' type.
526  unsigned getUnsignedAccumScale() const {
528  }
529  unsigned getUnsignedAccumIBits() const {
532  }
533 
534  /// getUnsignedLongAccumScale/IBits - Return the number of fractional/integral
535  /// bits in a 'unsigned long _Accum' type.
536  unsigned getUnsignedLongAccumScale() const {
538  }
539  unsigned getUnsignedLongAccumIBits() const {
543  }
544 
545  /// getShortFractScale - Return the number of fractional bits
546  /// in a 'signed short _Fract' type.
547  unsigned getShortFractScale() const { return ShortFractWidth - 1; }
548 
549  /// getFractScale - Return the number of fractional bits
550  /// in a 'signed _Fract' type.
551  unsigned getFractScale() const { return FractWidth - 1; }
552 
553  /// getLongFractScale - Return the number of fractional bits
554  /// in a 'signed long _Fract' type.
555  unsigned getLongFractScale() const { return LongFractWidth - 1; }
556 
557  /// getUnsignedShortFractScale - Return the number of fractional bits
558  /// in a 'unsigned short _Fract' type.
559  unsigned getUnsignedShortFractScale() const {
561  : getShortFractScale() + 1;
562  }
563 
564  /// getUnsignedFractScale - Return the number of fractional bits
565  /// in a 'unsigned _Fract' type.
566  unsigned getUnsignedFractScale() const {
568  }
569 
570  /// getUnsignedLongFractScale - Return the number of fractional bits
571  /// in a 'unsigned long _Fract' type.
572  unsigned getUnsignedLongFractScale() const {
574  : getLongFractScale() + 1;
575  }
576 
577  /// Determine whether the __int128 type is supported on this target.
578  virtual bool hasInt128Type() const {
579  return (getPointerWidth(0) >= 64) || getTargetOpts().ForceEnableInt128;
580  } // FIXME
581 
582  /// Determine whether the _ExtInt type is supported on this target. This
583  /// limitation is put into place for ABI reasons.
584  virtual bool hasExtIntType() const {
585  return false;
586  }
587 
588  /// Determine whether _Float16 is supported on this target.
589  virtual bool hasLegalHalfType() const { return HasLegalHalfType; }
590 
591  /// Determine whether the __float128 type is supported on this target.
592  virtual bool hasFloat128Type() const { return HasFloat128; }
593 
594  /// Determine whether the _Float16 type is supported on this target.
595  virtual bool hasFloat16Type() const { return HasFloat16; }
596 
597  /// Determine whether the _BFloat16 type is supported on this target.
598  virtual bool hasBFloat16Type() const { return HasBFloat16; }
599 
600  /// Determine whether the __ibm128 type is supported on this target.
601  virtual bool hasIbm128Type() const { return HasIbm128; }
602 
603  /// Determine whether constrained floating point is supported on this target.
604  virtual bool hasStrictFP() const { return HasStrictFP; }
605 
606  /// Return the alignment that is the largest alignment ever used for any
607  /// scalar/SIMD data type on the target machine you are compiling for
608  /// (including types with an extended alignment requirement).
609  unsigned getSuitableAlign() const { return SuitableAlign; }
610 
611  /// Return the default alignment for __attribute__((aligned)) on
612  /// this target, to be used if no alignment value is specified.
615  }
616 
617  /// getMinGlobalAlign - Return the minimum alignment of a global variable,
618  /// unless its alignment is explicitly reduced via attributes.
619  virtual unsigned getMinGlobalAlign (uint64_t) const {
620  return MinGlobalAlign;
621  }
622 
623  /// Return the largest alignment for which a suitably-sized allocation with
624  /// '::operator new(size_t)' or 'malloc' is guaranteed to produce a
625  /// correctly-aligned pointer.
626  unsigned getNewAlign() const {
628  }
629 
630  /// getWCharWidth/Align - Return the size of 'wchar_t' for this target, in
631  /// bits.
632  unsigned getWCharWidth() const { return getTypeWidth(WCharType); }
633  unsigned getWCharAlign() const { return getTypeAlign(WCharType); }
634 
635  /// getChar16Width/Align - Return the size of 'char16_t' for this target, in
636  /// bits.
637  unsigned getChar16Width() const { return getTypeWidth(Char16Type); }
638  unsigned getChar16Align() const { return getTypeAlign(Char16Type); }
639 
640  /// getChar32Width/Align - Return the size of 'char32_t' for this target, in
641  /// bits.
642  unsigned getChar32Width() const { return getTypeWidth(Char32Type); }
643  unsigned getChar32Align() const { return getTypeAlign(Char32Type); }
644 
645  /// getHalfWidth/Align/Format - Return the size/align/format of 'half'.
646  unsigned getHalfWidth() const { return HalfWidth; }
647  unsigned getHalfAlign() const { return HalfAlign; }
648  const llvm::fltSemantics &getHalfFormat() const { return *HalfFormat; }
649 
650  /// getFloatWidth/Align/Format - Return the size/align/format of 'float'.
651  unsigned getFloatWidth() const { return FloatWidth; }
652  unsigned getFloatAlign() const { return FloatAlign; }
653  const llvm::fltSemantics &getFloatFormat() const { return *FloatFormat; }
654 
655  /// getBFloat16Width/Align/Format - Return the size/align/format of '__bf16'.
656  unsigned getBFloat16Width() const { return BFloat16Width; }
657  unsigned getBFloat16Align() const { return BFloat16Align; }
658  const llvm::fltSemantics &getBFloat16Format() const { return *BFloat16Format; }
659 
660  /// getDoubleWidth/Align/Format - Return the size/align/format of 'double'.
661  unsigned getDoubleWidth() const { return DoubleWidth; }
662  unsigned getDoubleAlign() const { return DoubleAlign; }
663  const llvm::fltSemantics &getDoubleFormat() const { return *DoubleFormat; }
664 
665  /// getLongDoubleWidth/Align/Format - Return the size/align/format of 'long
666  /// double'.
667  unsigned getLongDoubleWidth() const { return LongDoubleWidth; }
668  unsigned getLongDoubleAlign() const { return LongDoubleAlign; }
669  const llvm::fltSemantics &getLongDoubleFormat() const {
670  return *LongDoubleFormat;
671  }
672 
673  /// getFloat128Width/Align/Format - Return the size/align/format of
674  /// '__float128'.
675  unsigned getFloat128Width() const { return 128; }
676  unsigned getFloat128Align() const { return Float128Align; }
677  const llvm::fltSemantics &getFloat128Format() const {
678  return *Float128Format;
679  }
680 
681  /// getIbm128Width/Align/Format - Return the size/align/format of
682  /// '__ibm128'.
683  unsigned getIbm128Width() const { return 128; }
684  unsigned getIbm128Align() const { return Ibm128Align; }
685  const llvm::fltSemantics &getIbm128Format() const { return *Ibm128Format; }
686 
687  /// Return the mangled code of long double.
688  virtual const char *getLongDoubleMangling() const { return "e"; }
689 
690  /// Return the mangled code of __float128.
691  virtual const char *getFloat128Mangling() const { return "g"; }
692 
693  /// Return the mangled code of __ibm128.
694  virtual const char *getIbm128Mangling() const {
695  llvm_unreachable("ibm128 not implemented on this target");
696  }
697 
698  /// Return the mangled code of bfloat.
699  virtual const char *getBFloat16Mangling() const {
700  llvm_unreachable("bfloat not implemented on this target");
701  }
702 
703  /// Return the value for the C99 FLT_EVAL_METHOD macro.
704  virtual unsigned getFloatEvalMethod() const { return 0; }
705 
706  // getLargeArrayMinWidth/Align - Return the minimum array size that is
707  // 'large' and its alignment.
708  unsigned getLargeArrayMinWidth() const { return LargeArrayMinWidth; }
709  unsigned getLargeArrayAlign() const { return LargeArrayAlign; }
710 
711  /// Return the maximum width lock-free atomic operation which will
712  /// ever be supported for the given target
713  unsigned getMaxAtomicPromoteWidth() const { return MaxAtomicPromoteWidth; }
714  /// Return the maximum width lock-free atomic operation which can be
715  /// inlined given the supported features of the given target.
716  unsigned getMaxAtomicInlineWidth() const { return MaxAtomicInlineWidth; }
717  /// Set the maximum inline or promote width lock-free atomic operation
718  /// for the given target.
719  virtual void setMaxAtomicWidth() {}
720  /// Returns true if the given target supports lock-free atomic
721  /// operations at the specified width and alignment.
722  virtual bool hasBuiltinAtomic(uint64_t AtomicSizeInBits,
723  uint64_t AlignmentInBits) const {
724  return AtomicSizeInBits <= AlignmentInBits &&
725  AtomicSizeInBits <= getMaxAtomicInlineWidth() &&
726  (AtomicSizeInBits <= getCharWidth() ||
727  llvm::isPowerOf2_64(AtomicSizeInBits / getCharWidth()));
728  }
729 
730  /// Return the maximum vector alignment supported for the given target.
731  unsigned getMaxVectorAlign() const { return MaxVectorAlign; }
732  /// Return default simd alignment for the given target. Generally, this
733  /// value is type-specific, but this alignment can be used for most of the
734  /// types for the given target.
735  unsigned getSimdDefaultAlign() const { return SimdDefaultAlign; }
736 
738 
739  /// Return the alignment (in bits) of the thrown exception object. This is
740  /// only meaningful for targets that allocate C++ exceptions in a system
741  /// runtime, such as those using the Itanium C++ ABI.
742  virtual unsigned getExnObjectAlignment() const {
743  // Itanium says that an _Unwind_Exception has to be "double-word"
744  // aligned (and thus the end of it is also so-aligned), meaning 16
745  // bytes. Of course, that was written for the actual Itanium,
746  // which is a 64-bit platform. Classically, the ABI doesn't really
747  // specify the alignment on other platforms, but in practice
748  // libUnwind declares the struct with __attribute__((aligned)), so
749  // we assume that alignment here. (It's generally 16 bytes, but
750  // some targets overwrite it.)
752  }
753 
754  /// Return the size of intmax_t and uintmax_t for this target, in bits.
755  unsigned getIntMaxTWidth() const {
756  return getTypeWidth(IntMaxType);
757  }
758 
759  // Return the size of unwind_word for this target.
760  virtual unsigned getUnwindWordWidth() const { return getPointerWidth(0); }
761 
762  /// Return the "preferred" register width on this target.
763  virtual unsigned getRegisterWidth() const {
764  // Currently we assume the register width on the target matches the pointer
765  // width, we can introduce a new variable for this if/when some target wants
766  // it.
767  return PointerWidth;
768  }
769 
770  /// \brief Returns the default value of the __USER_LABEL_PREFIX__ macro,
771  /// which is the prefix given to user symbols by default.
772  ///
773  /// On most platforms this is "", but it is "_" on some.
774  const char *getUserLabelPrefix() const { return UserLabelPrefix; }
775 
776  /// Returns the name of the mcount instrumentation function.
777  const char *getMCountName() const {
778  return MCountName;
779  }
780 
781  /// Check if the Objective-C built-in boolean type should be signed
782  /// char.
783  ///
784  /// Otherwise, if this returns false, the normal built-in boolean type
785  /// should also be used for Objective-C.
788  }
790  UseSignedCharForObjCBool = false;
791  }
792 
793  /// Check whether the alignment of bit-field types is respected
794  /// when laying out structures.
797  }
798 
799  /// Check whether zero length bitfields should force alignment of
800  /// the next member.
803  }
804 
805  /// Check whether zero length bitfield alignment is respected if they are
806  /// leading members.
809  }
810 
811  /// Get the fixed alignment value in bits for a member that follows
812  /// a zero length bitfield.
813  unsigned getZeroLengthBitfieldBoundary() const {
815  }
816 
817  /// Get the maximum alignment in bits for a static variable with
818  /// aligned attribute.
819  unsigned getMaxAlignedAttribute() const { return MaxAlignedAttribute; }
820 
821  /// Check whether explicit bitfield alignment attributes should be
822  // honored, as in "__attribute__((aligned(2))) int b : 1;".
825  }
826 
827  /// Check whether this target support '\#pragma options align=mac68k'.
828  bool hasAlignMac68kSupport() const {
829  return HasAlignMac68kSupport;
830  }
831 
832  /// Return the user string for the specified integer type enum.
833  ///
834  /// For example, SignedShort -> "short".
835  static const char *getTypeName(IntType T);
836 
837  /// Return the constant suffix for the specified integer type enum.
838  ///
839  /// For example, SignedLong -> "L".
840  const char *getTypeConstantSuffix(IntType T) const;
841 
842  /// Return the printf format modifier for the specified
843  /// integer type enum.
844  ///
845  /// For example, SignedLong -> "l".
846  static const char *getTypeFormatModifier(IntType T);
847 
848  /// Check whether the given real type should use the "fpret" flavor of
849  /// Objective-C message passing on this target.
851  return RealTypeUsesObjCFPRet & (1 << T);
852  }
853 
854  /// Check whether _Complex long double should use the "fp2ret" flavor
855  /// of Objective-C message passing on this target.
858  }
859 
860  /// Check whether llvm intrinsics such as llvm.convert.to.fp16 should be used
861  /// to convert to and from __fp16.
862  /// FIXME: This function should be removed once all targets stop using the
863  /// conversion intrinsics.
864  virtual bool useFP16ConversionIntrinsics() const {
865  return true;
866  }
867 
868  /// Specify if mangling based on address space map should be used or
869  /// not for language specific address spaces
872  }
873 
874  ///===---- Other target property query methods --------------------------===//
875 
876  /// Appends the target-specific \#define values for this
877  /// target set to the specified buffer.
878  virtual void getTargetDefines(const LangOptions &Opts,
879  MacroBuilder &Builder) const = 0;
880 
881 
882  /// Return information about target-specific builtins for
883  /// the current primary target, and info about which builtins are non-portable
884  /// across the current set of primary and secondary targets.
885  virtual ArrayRef<Builtin::Info> getTargetBuiltins() const = 0;
886 
887  /// Returns target-specific min and max values VScale_Range.
889  getVScaleRange(const LangOptions &LangOpts) const {
890  return None;
891  }
892  /// The __builtin_clz* and __builtin_ctz* built-in
893  /// functions are specified to have undefined results for zero inputs, but
894  /// on targets that support these operations in a way that provides
895  /// well-defined results for zero without loss of performance, it is a good
896  /// idea to avoid optimizing based on that undef behavior.
897  virtual bool isCLZForZeroUndef() const { return true; }
898 
899  /// Returns the kind of __builtin_va_list type that should be used
900  /// with this target.
901  virtual BuiltinVaListKind getBuiltinVaListKind() const = 0;
902 
903  /// Returns whether or not type \c __builtin_ms_va_list type is
904  /// available on this target.
905  bool hasBuiltinMSVaList() const { return HasBuiltinMSVaList; }
906 
907  /// Returns true for RenderScript.
909 
910  /// Returns whether or not the AArch64 SVE built-in types are
911  /// available on this target.
912  bool hasAArch64SVETypes() const { return HasAArch64SVETypes; }
913 
914  /// Returns whether or not the RISC-V V built-in types are
915  /// available on this target.
916  bool hasRISCVVTypes() const { return HasRISCVVTypes; }
917 
918  /// Returns whether or not the AMDGPU unsafe floating point atomics are
919  /// allowed.
921 
922  /// For ARM targets returns a mask defining which coprocessors are configured
923  /// as Custom Datapath.
924  uint32_t getARMCDECoprocMask() const { return ARMCDECoprocMask; }
925 
926  /// Returns whether the passed in string is a valid clobber in an
927  /// inline asm statement.
928  ///
929  /// This is used by Sema.
930  bool isValidClobber(StringRef Name) const;
931 
932  /// Returns whether the passed in string is a valid register name
933  /// according to GCC.
934  ///
935  /// This is used by Sema for inline asm statements.
936  virtual bool isValidGCCRegisterName(StringRef Name) const;
937 
938  /// Returns the "normalized" GCC register name.
939  ///
940  /// ReturnCannonical true will return the register name without any additions
941  /// such as "{}" or "%" in it's canonical form, for example:
942  /// ReturnCanonical = true and Name = "rax", will return "ax".
943  StringRef getNormalizedGCCRegisterName(StringRef Name,
944  bool ReturnCanonical = false) const;
945 
946  virtual bool isSPRegName(StringRef) const { return false; }
947 
948  /// Extracts a register from the passed constraint (if it is a
949  /// single-register constraint) and the asm label expression related to a
950  /// variable in the input or output list of an inline asm statement.
951  ///
952  /// This function is used by Sema in order to diagnose conflicts between
953  /// the clobber list and the input/output lists.
954  virtual StringRef getConstraintRegister(StringRef Constraint,
955  StringRef Expression) const {
956  return "";
957  }
958 
959  struct ConstraintInfo {
960  enum {
961  CI_None = 0x00,
964  CI_ReadWrite = 0x04, // "+r" output constraint (read and write).
965  CI_HasMatchingInput = 0x08, // This output operand has a matching input.
966  CI_ImmediateConstant = 0x10, // This operand must be an immediate constant
967  CI_EarlyClobber = 0x20, // "&" output constraint (early clobber).
968  };
969  unsigned Flags;
971  struct {
972  int Min;
973  int Max;
975  } ImmRange;
976  llvm::SmallSet<int, 4> ImmSet;
977 
978  std::string ConstraintStr; // constraint: "=rm"
979  std::string Name; // Operand name: [foo] with no []'s.
980  public:
981  ConstraintInfo(StringRef ConstraintStr, StringRef Name)
982  : Flags(0), TiedOperand(-1), ConstraintStr(ConstraintStr.str()),
983  Name(Name.str()) {
984  ImmRange.Min = ImmRange.Max = 0;
985  ImmRange.isConstrained = false;
986  }
987 
988  const std::string &getConstraintStr() const { return ConstraintStr; }
989  const std::string &getName() const { return Name; }
990  bool isReadWrite() const { return (Flags & CI_ReadWrite) != 0; }
991  bool earlyClobber() { return (Flags & CI_EarlyClobber) != 0; }
992  bool allowsRegister() const { return (Flags & CI_AllowsRegister) != 0; }
993  bool allowsMemory() const { return (Flags & CI_AllowsMemory) != 0; }
994 
995  /// Return true if this output operand has a matching
996  /// (tied) input operand.
997  bool hasMatchingInput() const { return (Flags & CI_HasMatchingInput) != 0; }
998 
999  /// Return true if this input operand is a matching
1000  /// constraint that ties it to an output operand.
1001  ///
1002  /// If this returns true then getTiedOperand will indicate which output
1003  /// operand this is tied to.
1004  bool hasTiedOperand() const { return TiedOperand != -1; }
1005  unsigned getTiedOperand() const {
1006  assert(hasTiedOperand() && "Has no tied operand!");
1007  return (unsigned)TiedOperand;
1008  }
1009 
1011  return (Flags & CI_ImmediateConstant) != 0;
1012  }
1014  if (!ImmSet.empty())
1015  return Value.isSignedIntN(32) &&
1016  ImmSet.count(Value.getZExtValue()) != 0;
1017  return !ImmRange.isConstrained ||
1018  (Value.sge(ImmRange.Min) && Value.sle(ImmRange.Max));
1019  }
1020 
1026  void setRequiresImmediate(int Min, int Max) {
1028  ImmRange.Min = Min;
1029  ImmRange.Max = Max;
1030  ImmRange.isConstrained = true;
1031  }
1034  for (int Exact : Exacts)
1035  ImmSet.insert(Exact);
1036  }
1037  void setRequiresImmediate(int Exact) {
1039  ImmSet.insert(Exact);
1040  }
1043  }
1044 
1045  /// Indicate that this is an input operand that is tied to
1046  /// the specified output operand.
1047  ///
1048  /// Copy over the various constraint information from the output.
1049  void setTiedOperand(unsigned N, ConstraintInfo &Output) {
1050  Output.setHasMatchingInput();
1051  Flags = Output.Flags;
1052  TiedOperand = N;
1053  // Don't copy Name or constraint string.
1054  }
1055  };
1056 
1057  /// Validate register name used for global register variables.
1058  ///
1059  /// This function returns true if the register passed in RegName can be used
1060  /// for global register variables on this target. In addition, it returns
1061  /// true in HasSizeMismatch if the size of the register doesn't match the
1062  /// variable size passed in RegSize.
1063  virtual bool validateGlobalRegisterVariable(StringRef RegName,
1064  unsigned RegSize,
1065  bool &HasSizeMismatch) const {
1066  HasSizeMismatch = false;
1067  return true;
1068  }
1069 
1070  // validateOutputConstraint, validateInputConstraint - Checks that
1071  // a constraint is valid and provides information about it.
1072  // FIXME: These should return a real error instead of just true/false.
1073  bool validateOutputConstraint(ConstraintInfo &Info) const;
1075  ConstraintInfo &info) const;
1076 
1077  virtual bool validateOutputSize(const llvm::StringMap<bool> &FeatureMap,
1078  StringRef /*Constraint*/,
1079  unsigned /*Size*/) const {
1080  return true;
1081  }
1082 
1083  virtual bool validateInputSize(const llvm::StringMap<bool> &FeatureMap,
1084  StringRef /*Constraint*/,
1085  unsigned /*Size*/) const {
1086  return true;
1087  }
1088  virtual bool
1089  validateConstraintModifier(StringRef /*Constraint*/,
1090  char /*Modifier*/,
1091  unsigned /*Size*/,
1092  std::string &/*SuggestedModifier*/) const {
1093  return true;
1094  }
1095  virtual bool
1096  validateAsmConstraint(const char *&Name,
1097  TargetInfo::ConstraintInfo &info) const = 0;
1098 
1099  bool resolveSymbolicName(const char *&Name,
1100  ArrayRef<ConstraintInfo> OutputConstraints,
1101  unsigned &Index) const;
1102 
1103  // Constraint parm will be left pointing at the last character of
1104  // the constraint. In practice, it won't be changed unless the
1105  // constraint is longer than one character.
1106  virtual std::string convertConstraint(const char *&Constraint) const {
1107  // 'p' defaults to 'r', but can be overridden by targets.
1108  if (*Constraint == 'p')
1109  return std::string("r");
1110  return std::string(1, *Constraint);
1111  }
1112 
1113  /// Replace some escaped characters with another string based on
1114  /// target-specific rules
1116  return llvm::None;
1117  }
1118 
1119  /// Returns a string of target-specific clobbers, in LLVM format.
1120  virtual const char *getClobbers() const = 0;
1121 
1122  /// Returns true if NaN encoding is IEEE 754-2008.
1123  /// Only MIPS allows a different encoding.
1124  virtual bool isNan2008() const {
1125  return true;
1126  }
1127 
1128  /// Returns the target triple of the primary target.
1129  const llvm::Triple &getTriple() const {
1130  return Triple;
1131  }
1132 
1133  /// Returns the target ID if supported.
1134  virtual llvm::Optional<std::string> getTargetID() const { return llvm::None; }
1135 
1136  const char *getDataLayoutString() const {
1137  assert(!DataLayoutString.empty() && "Uninitialized DataLayout!");
1138  return DataLayoutString.c_str();
1139  }
1140 
1141  struct GCCRegAlias {
1142  const char * const Aliases[5];
1143  const char * const Register;
1144  };
1145 
1146  struct AddlRegName {
1147  const char * const Names[5];
1148  const unsigned RegNum;
1149  };
1150 
1151  /// Does this target support "protected" visibility?
1152  ///
1153  /// Any target which dynamic libraries will naturally support
1154  /// something like "default" (meaning that the symbol is visible
1155  /// outside this shared object) and "hidden" (meaning that it isn't)
1156  /// visibilities, but "protected" is really an ELF-specific concept
1157  /// with weird semantics designed around the convenience of dynamic
1158  /// linker implementations. Which is not to suggest that there's
1159  /// consistent target-independent semantics for "default" visibility
1160  /// either; the entire thing is pretty badly mangled.
1161  virtual bool hasProtectedVisibility() const { return true; }
1162 
1163  /// Does this target aim for semantic compatibility with
1164  /// Microsoft C++ code using dllimport/export attributes?
1165  virtual bool shouldDLLImportComdatSymbols() const {
1166  return getTriple().isWindowsMSVCEnvironment() ||
1167  getTriple().isWindowsItaniumEnvironment() || getTriple().isPS4CPU();
1168  }
1169 
1170  // Does this target have PS4 specific dllimport/export handling?
1171  virtual bool hasPS4DLLImportExport() const {
1172  return getTriple().isPS4CPU() ||
1173  // Windows Itanium support allows for testing the SCEI flavour of
1174  // dllimport/export handling on a Windows system.
1175  (getTriple().isWindowsItaniumEnvironment() &&
1176  getTriple().getVendor() == llvm::Triple::SCEI);
1177  }
1178 
1179  /// Set forced language options.
1180  ///
1181  /// Apply changes to the target information with respect to certain
1182  /// language options which change the target configuration and adjust
1183  /// the language based on the target options where applicable.
1184  virtual void adjust(DiagnosticsEngine &Diags, LangOptions &Opts);
1185 
1186  /// Adjust target options based on codegen options.
1187  virtual void adjustTargetOptions(const CodeGenOptions &CGOpts,
1188  TargetOptions &TargetOpts) const {}
1189 
1190  /// Initialize the map with the default set of target features for the
1191  /// CPU this should include all legal feature strings on the target.
1192  ///
1193  /// \return False on error (invalid features).
1194  virtual bool initFeatureMap(llvm::StringMap<bool> &Features,
1195  DiagnosticsEngine &Diags, StringRef CPU,
1196  const std::vector<std::string> &FeatureVec) const;
1197 
1198  /// Get the ABI currently in use.
1199  virtual StringRef getABI() const { return StringRef(); }
1200 
1201  /// Get the C++ ABI currently in use.
1203  return TheCXXABI;
1204  }
1205 
1206  /// Target the specified CPU.
1207  ///
1208  /// \return False on error (invalid CPU name).
1209  virtual bool setCPU(const std::string &Name) {
1210  return false;
1211  }
1212 
1213  /// Fill a SmallVectorImpl with the valid values to setCPU.
1214  virtual void fillValidCPUList(SmallVectorImpl<StringRef> &Values) const {}
1215 
1216  /// Fill a SmallVectorImpl with the valid values for tuning CPU.
1217  virtual void fillValidTuneCPUList(SmallVectorImpl<StringRef> &Values) const {
1218  fillValidCPUList(Values);
1219  }
1220 
1221  /// brief Determine whether this TargetInfo supports the given CPU name.
1222  virtual bool isValidCPUName(StringRef Name) const {
1223  return true;
1224  }
1225 
1226  /// brief Determine whether this TargetInfo supports the given CPU name for
1227  // tuning.
1228  virtual bool isValidTuneCPUName(StringRef Name) const {
1229  return isValidCPUName(Name);
1230  }
1231 
1232  /// brief Determine whether this TargetInfo supports tune in target attribute.
1233  virtual bool supportsTargetAttributeTune() const {
1234  return false;
1235  }
1236 
1237  /// Use the specified ABI.
1238  ///
1239  /// \return False on error (invalid ABI name).
1240  virtual bool setABI(const std::string &Name) {
1241  return false;
1242  }
1243 
1244  /// Use the specified unit for FP math.
1245  ///
1246  /// \return False on error (invalid unit name).
1247  virtual bool setFPMath(StringRef Name) {
1248  return false;
1249  }
1250 
1251  /// Check if target has a given feature enabled
1252  virtual bool hasFeatureEnabled(const llvm::StringMap<bool> &Features,
1253  StringRef Name) const {
1254  return Features.lookup(Name);
1255  }
1256 
1257  /// Enable or disable a specific target feature;
1258  /// the feature name must be valid.
1259  virtual void setFeatureEnabled(llvm::StringMap<bool> &Features,
1260  StringRef Name,
1261  bool Enabled) const {
1262  Features[Name] = Enabled;
1263  }
1264 
1265  /// Determine whether this TargetInfo supports the given feature.
1266  virtual bool isValidFeatureName(StringRef Feature) const {
1267  return true;
1268  }
1269 
1276  };
1277 
1278  /// Determine if this TargetInfo supports the given branch protection
1279  /// specification
1280  virtual bool validateBranchProtection(StringRef Spec,
1281  BranchProtectionInfo &BPI,
1282  StringRef &Err) const {
1283  Err = "";
1284  return false;
1285  }
1286 
1287  /// Perform initialization based on the user configured
1288  /// set of features (e.g., +sse4).
1289  ///
1290  /// The list is guaranteed to have at most one entry per feature.
1291  ///
1292  /// The target may modify the features list, to change which options are
1293  /// passed onwards to the backend.
1294  /// FIXME: This part should be fixed so that we can change handleTargetFeatures
1295  /// to merely a TargetInfo initialization routine.
1296  ///
1297  /// \return False on error.
1298  virtual bool handleTargetFeatures(std::vector<std::string> &Features,
1299  DiagnosticsEngine &Diags) {
1300  return true;
1301  }
1302 
1303  /// Determine whether the given target has the given feature.
1304  virtual bool hasFeature(StringRef Feature) const {
1305  return false;
1306  }
1307 
1308  /// Identify whether this target supports multiversioning of functions,
1309  /// which requires support for cpu_supports and cpu_is functionality.
1310  bool supportsMultiVersioning() const { return getTriple().isX86(); }
1311 
1312  /// Identify whether this target supports IFuncs.
1313  bool supportsIFunc() const { return getTriple().isOSBinFormatELF(); }
1314 
1315  // Validate the contents of the __builtin_cpu_supports(const char*)
1316  // argument.
1317  virtual bool validateCpuSupports(StringRef Name) const { return false; }
1318 
1319  // Return the target-specific priority for features/cpus/vendors so
1320  // that they can be properly sorted for checking.
1321  virtual unsigned multiVersionSortPriority(StringRef Name) const {
1322  return 0;
1323  }
1324 
1325  // Validate the contents of the __builtin_cpu_is(const char*)
1326  // argument.
1327  virtual bool validateCpuIs(StringRef Name) const { return false; }
1328 
1329  // Validate a cpu_dispatch/cpu_specific CPU option, which is a different list
1330  // from cpu_is, since it checks via features rather than CPUs directly.
1331  virtual bool validateCPUSpecificCPUDispatch(StringRef Name) const {
1332  return false;
1333  }
1334 
1335  // Get the character to be added for mangling purposes for cpu_specific.
1336  virtual char CPUSpecificManglingCharacter(StringRef Name) const {
1337  llvm_unreachable(
1338  "cpu_specific Multiversioning not implemented on this target");
1339  }
1340 
1341  // Get a list of the features that make up the CPU option for
1342  // cpu_specific/cpu_dispatch so that it can be passed to llvm as optimization
1343  // options.
1345  StringRef Name, llvm::SmallVectorImpl<StringRef> &Features) const {
1346  llvm_unreachable(
1347  "cpu_specific Multiversioning not implemented on this target");
1348  }
1349 
1350  // Get the cache line size of a given cpu. This method switches over
1351  // the given cpu and returns "None" if the CPU is not found.
1352  virtual Optional<unsigned> getCPUCacheLineSize() const { return None; }
1353 
1354  // Returns maximal number of args passed in registers.
1355  unsigned getRegParmMax() const {
1356  assert(RegParmMax < 7 && "RegParmMax value is larger than AST can handle");
1357  return RegParmMax;
1358  }
1359 
1360  /// Whether the target supports thread-local storage.
1361  bool isTLSSupported() const {
1362  return TLSSupported;
1363  }
1364 
1365  /// Return the maximum alignment (in bits) of a TLS variable
1366  ///
1367  /// Gets the maximum alignment (in bits) of a TLS variable on this target.
1368  /// Returns zero if there is no such constraint.
1369  unsigned getMaxTLSAlign() const { return MaxTLSAlign; }
1370 
1371  /// Whether target supports variable-length arrays.
1372  bool isVLASupported() const { return VLASupported; }
1373 
1374  /// Whether the target supports SEH __try.
1375  bool isSEHTrySupported() const {
1376  return getTriple().isOSWindows() &&
1377  (getTriple().isX86() ||
1378  getTriple().getArch() == llvm::Triple::aarch64);
1379  }
1380 
1381  /// Return true if {|} are normal characters in the asm string.
1382  ///
1383  /// If this returns false (the default), then {abc|xyz} is syntax
1384  /// that says that when compiling for asm variant #0, "abc" should be
1385  /// generated, but when compiling for asm variant #1, "xyz" should be
1386  /// generated.
1387  bool hasNoAsmVariants() const {
1388  return NoAsmVariants;
1389  }
1390 
1391  /// Return the register number that __builtin_eh_return_regno would
1392  /// return with the specified argument.
1393  /// This corresponds with TargetLowering's getExceptionPointerRegister
1394  /// and getExceptionSelectorRegister in the backend.
1395  virtual int getEHDataRegisterNumber(unsigned RegNo) const {
1396  return -1;
1397  }
1398 
1399  /// Return the section to use for C++ static initialization functions.
1400  virtual const char *getStaticInitSectionSpecifier() const {
1401  return nullptr;
1402  }
1403 
1404  const LangASMap &getAddressSpaceMap() const { return *AddrSpaceMap; }
1405 
1406  /// Map from the address space field in builtin description strings to the
1407  /// language address space.
1408  virtual LangAS getOpenCLBuiltinAddressSpace(unsigned AS) const {
1409  return getLangASFromTargetAS(AS);
1410  }
1411 
1412  /// Map from the address space field in builtin description strings to the
1413  /// language address space.
1414  virtual LangAS getCUDABuiltinAddressSpace(unsigned AS) const {
1415  return getLangASFromTargetAS(AS);
1416  }
1417 
1418  /// Return an AST address space which can be used opportunistically
1419  /// for constant global memory. It must be possible to convert pointers into
1420  /// this address space to LangAS::Default. If no such address space exists,
1421  /// this may return None, and such optimizations will be disabled.
1423  return LangAS::Default;
1424  }
1425 
1426  // access target-specific GPU grid values that must be consistent between
1427  // host RTL (plugin), deviceRTL and clang.
1428  virtual const llvm::omp::GV &getGridValue() const {
1429  llvm_unreachable("getGridValue not implemented on this target");
1430  }
1431 
1432  /// Retrieve the name of the platform as it is used in the
1433  /// availability attribute.
1434  StringRef getPlatformName() const { return PlatformName; }
1435 
1436  /// Retrieve the minimum desired version of the platform, to
1437  /// which the program should be compiled.
1438  VersionTuple getPlatformMinVersion() const { return PlatformMinVersion; }
1439 
1440  bool isBigEndian() const { return BigEndian; }
1441  bool isLittleEndian() const { return !BigEndian; }
1442 
1443  /// Whether the option -fextend-arguments={32,64} is supported on the target.
1444  virtual bool supportsExtendIntArgs() const { return false; }
1445 
1446  /// Controls if __arithmetic_fence is supported in the targeted backend.
1447  virtual bool checkArithmeticFenceSupported() const { return false; }
1448 
1449  /// Gets the default calling convention for the given target and
1450  /// declaration context.
1452  // Not all targets will specify an explicit calling convention that we can
1453  // express. This will always do the right thing, even though it's not
1454  // an explicit calling convention.
1455  return CC_C;
1456  }
1457 
1463  };
1464 
1465  /// Determines whether a given calling convention is valid for the
1466  /// target. A calling convention can either be accepted, produce a warning
1467  /// and be substituted with the default calling convention, or (someday)
1468  /// produce an error (such as using thiscall on a non-instance function).
1470  switch (CC) {
1471  default:
1472  return CCCR_Warning;
1473  case CC_C:
1474  return CCCR_OK;
1475  }
1476  }
1477 
1482  };
1483 
1484  virtual CallingConvKind getCallingConvKind(bool ClangABICompat4) const;
1485 
1486  /// Controls if __builtin_longjmp / __builtin_setjmp can be lowered to
1487  /// llvm.eh.sjlj.longjmp / llvm.eh.sjlj.setjmp.
1488  virtual bool hasSjLjLowering() const {
1489  return false;
1490  }
1491 
1492  /// Check if the target supports CFProtection branch.
1493  virtual bool
1495 
1496  /// Check if the target supports CFProtection branch.
1497  virtual bool
1499 
1500  /// Whether target allows to overalign ABI-specified preferred alignment
1501  virtual bool allowsLargerPreferedTypeAlignment() const { return true; }
1502 
1503  /// Whether target defaults to the `power` alignment rules of AIX.
1504  virtual bool defaultsToAIXPowerAlignment() const { return false; }
1505 
1506  /// Set supported OpenCL extensions and optional core features.
1507  virtual void setSupportedOpenCLOpts() {}
1508 
1509  virtual void supportAllOpenCLOpts(bool V = true) {
1510 #define OPENCLEXTNAME(Ext) \
1511  setFeatureEnabled(getTargetOpts().OpenCLFeaturesMap, #Ext, V);
1512 #include "clang/Basic/OpenCLExtensions.def"
1513  }
1514 
1515  /// Set supported OpenCL extensions as written on command line
1516  virtual void setCommandLineOpenCLOpts() {
1517  for (const auto &Ext : getTargetOpts().OpenCLExtensionsAsWritten) {
1518  bool IsPrefixed = (Ext[0] == '+' || Ext[0] == '-');
1519  std::string Name = IsPrefixed ? Ext.substr(1) : Ext;
1520  bool V = IsPrefixed ? Ext[0] == '+' : true;
1521 
1522  if (Name == "all") {
1524  continue;
1525  }
1526 
1527  getTargetOpts().OpenCLFeaturesMap[Name] = V;
1528  }
1529  }
1530 
1531  /// Get supported OpenCL extensions and optional core features.
1532  llvm::StringMap<bool> &getSupportedOpenCLOpts() {
1534  }
1535 
1536  /// Get const supported OpenCL extensions and optional core features.
1537  const llvm::StringMap<bool> &getSupportedOpenCLOpts() const {
1539  }
1540 
1541  /// Get address space for OpenCL type.
1542  virtual LangAS getOpenCLTypeAddrSpace(OpenCLTypeKind TK) const;
1543 
1544  /// \returns Target specific vtbl ptr address space.
1545  virtual unsigned getVtblPtrAddressSpace() const {
1546  return 0;
1547  }
1548 
1549  /// \returns If a target requires an address within a target specific address
1550  /// space \p AddressSpace to be converted in order to be used, then return the
1551  /// corresponding target specific DWARF address space.
1552  ///
1553  /// \returns Otherwise return None and no conversion will be emitted in the
1554  /// DWARF.
1555  virtual Optional<unsigned> getDWARFAddressSpace(unsigned AddressSpace) const {
1556  return None;
1557  }
1558 
1559  /// \returns The version of the SDK which was used during the compilation if
1560  /// one was specified, or an empty version otherwise.
1561  const llvm::VersionTuple &getSDKVersion() const {
1562  return getTargetOpts().SDKVersion;
1563  }
1564 
1565  /// Check the target is valid after it is fully initialized.
1566  virtual bool validateTarget(DiagnosticsEngine &Diags) const {
1567  return true;
1568  }
1569 
1570  /// Check that OpenCL target has valid options setting based on OpenCL
1571  /// version.
1572  virtual bool validateOpenCLTarget(const LangOptions &Opts,
1573  DiagnosticsEngine &Diags) const;
1574 
1575  virtual void setAuxTarget(const TargetInfo *Aux) {}
1576 
1577  /// Whether target allows debuginfo types for decl only variables/functions.
1578  virtual bool allowDebugInfoForExternalRef() const { return false; }
1579 
1580 protected:
1581  /// Copy type and layout related info.
1582  void copyAuxTarget(const TargetInfo *Aux);
1583  virtual uint64_t getPointerWidthV(unsigned AddrSpace) const {
1584  return PointerWidth;
1585  }
1586  virtual uint64_t getPointerAlignV(unsigned AddrSpace) const {
1587  return PointerAlign;
1588  }
1589  virtual enum IntType getPtrDiffTypeV(unsigned AddrSpace) const {
1590  return PtrDiffType;
1591  }
1592  virtual ArrayRef<const char *> getGCCRegNames() const = 0;
1593  virtual ArrayRef<GCCRegAlias> getGCCRegAliases() const = 0;
1595  return None;
1596  }
1597 
1598  private:
1599  // Assert the values for the fractional and integral bits for each fixed point
1600  // type follow the restrictions given in clause 6.2.6.3 of N1169.
1601  void CheckFixedPointBits() const;
1602 };
1603 
1604 } // end namespace clang
1605 
1606 #endif
clang::TransferrableTargetInfo::PointerAlign
unsigned char PointerAlign
Definition: TargetInfo.h:60
clang::TargetInfo::DataLayoutString
std::string DataLayoutString
Definition: TargetInfo.h:210
clang::TransferrableTargetInfo::Double
@ Double
Definition: TargetInfo.h:127
clang::TransferrableTargetInfo::LongWidth
unsigned char LongWidth
Definition: TargetInfo.h:69
clang::TargetInfo::isNan2008
virtual bool isNan2008() const
Returns true if NaN encoding is IEEE 754-2008.
Definition: TargetInfo.h:1124
clang::TargetInfo::isRenderScriptTarget
bool isRenderScriptTarget() const
Returns true for RenderScript.
Definition: TargetInfo.h:908
clang::LangOptions::SignReturnAddressScopeKind
SignReturnAddressScopeKind
Definition: LangOptions.h:259
clang::TransferrableTargetInfo::SuitableAlign
unsigned char SuitableAlign
Definition: TargetInfo.h:98
clang::TargetInfo::PNaClABIBuiltinVaList
@ PNaClABIBuiltinVaList
__builtin_va_list as defined by the PNaCl ABI: http://www.chromium.org/nativeclient/pnacl/bitcode-abi...
Definition: TargetInfo.h:278
clang::TargetInfo::getDataLayoutString
const char * getDataLayoutString() const
Definition: TargetInfo.h:1136
clang::TargetInfo::ConstraintInfo::allowsMemory
bool allowsMemory() const
Definition: TargetInfo.h:993
clang::TargetInfo::CCCR_Ignore
@ CCCR_Ignore
Definition: TargetInfo.h:1461
clang::TargetInfo::BranchProtectionInfo::SignKey
LangOptions::SignReturnAddressKeyKind SignKey
Definition: TargetInfo.h:1273
clang::TargetInfo::getShortFractWidth
unsigned getShortFractWidth() const
getShortFractWidth/Align - Return the size of 'signed short _Fract' and 'unsigned short _Fract' for t...
Definition: TargetInfo.h:481
clang::TargetInfo::getVtblPtrAddressSpace
virtual unsigned getVtblPtrAddressSpace() const
Definition: TargetInfo.h:1545
clang::TransferrableTargetInfo::LargeArrayAlign
unsigned char LargeArrayAlign
Definition: TargetInfo.h:68
clang::TargetInfo::getMaxVectorAlign
unsigned getMaxVectorAlign() const
Return the maximum vector alignment supported for the given target.
Definition: TargetInfo.h:731
clang::TargetInfo::GCCRegAlias::Register
const char *const Register
Definition: TargetInfo.h:1143
clang::TargetInfo::getProcessIDType
IntType getProcessIDType() const
Definition: TargetInfo.h:359
clang::TargetInfo::hasExtIntType
virtual bool hasExtIntType() const
Determine whether the _ExtInt type is supported on this target.
Definition: TargetInfo.h:584
max
__DEVICE__ int max(int __a, int __b)
Definition: __clang_cuda_math.h:196
clang::TargetInfo::getWCharAlign
unsigned getWCharAlign() const
Definition: TargetInfo.h:633
clang::TargetInfo::getLongDoubleFormat
const llvm::fltSemantics & getLongDoubleFormat() const
Definition: TargetInfo.h:669
llvm
Definition: Dominators.h:30
clang::TargetInfo::isCLZForZeroUndef
virtual bool isCLZForZeroUndef() const
The __builtin_clz* and __builtin_ctz* built-in functions are specified to have undefined results for ...
Definition: TargetInfo.h:897
clang::TargetInfo::CCK_Default
@ CCK_Default
Definition: TargetInfo.h:1479
clang::TargetInfo::PlatformMinVersion
VersionTuple PlatformMinVersion
Definition: TargetInfo.h:218
clang::TargetInfo::RegParmMax
unsigned char RegParmMax
Definition: TargetInfo.h:213
clang::TransferrableTargetInfo::IntPtrType
IntType IntPtrType
Definition: TargetInfo.h:134
clang::TransferrableTargetInfo::ShortFractAlign
unsigned char ShortFractAlign
Definition: TargetInfo.h:76
clang::TransferrableTargetInfo::AccumWidth
unsigned char AccumWidth
Definition: TargetInfo.h:74
clang::TargetInfo::getClobbers
virtual const char * getClobbers() const =0
Returns a string of target-specific clobbers, in LLVM format.
clang::TargetInfo::useObjCFPRetForRealType
bool useObjCFPRetForRealType(RealType T) const
Check whether the given real type should use the "fpret" flavor of Objective-C message passing on thi...
Definition: TargetInfo.h:850
Specifiers.h
clang::TransferrableTargetInfo::UnsignedChar
@ UnsignedChar
Definition: TargetInfo.h:113
clang::interp::APInt
llvm::APInt APInt
Definition: Integral.h:27
clang::TargetInfo::getRegParmMax
unsigned getRegParmMax() const
Definition: TargetInfo.h:1355
clang::TargetInfo::ConstraintInfo::CI_ReadWrite
@ CI_ReadWrite
Definition: TargetInfo.h:964
clang::TargetInfo::isValidGCCRegisterName
virtual bool isValidGCCRegisterName(StringRef Name) const
Returns whether the passed in string is a valid register name according to GCC.
Definition: TargetInfo.cpp:515
clang::TransferrableTargetInfo::IntMaxType
IntType IntMaxType
Definition: TargetInfo.h:134
clang::TargetInfo::ConstraintInfo::getName
const std::string & getName() const
Definition: TargetInfo.h:989
clang::TargetInfo::supportsExtendIntArgs
virtual bool supportsExtendIntArgs() const
Whether the option -fextend-arguments={32,64} is supported on the target.
Definition: TargetInfo.h:1444
clang::TargetInfo::getAccumIBits
unsigned getAccumIBits() const
Definition: TargetInfo.h:504
clang::TargetInfo::getLongAccumIBits
unsigned getLongAccumIBits() const
Definition: TargetInfo.h:509
clang::TargetInfo::getBuiltinVaListKind
virtual BuiltinVaListKind getBuiltinVaListKind() const =0
Returns the kind of __builtin_va_list type that should be used with this target.
string
string(SUBSTRING ${CMAKE_CURRENT_BINARY_DIR} 0 ${PATH_LIB_START} PATH_HEAD) string(SUBSTRING $
Definition: CMakeLists.txt:22
clang::TransferrableTargetInfo::SignedChar
@ SignedChar
Definition: TargetInfo.h:112
clang::TargetInfo::CCCR_Warning
@ CCCR_Warning
Definition: TargetInfo.h:1460
clang::TargetInfo::CCK_ClangABI4OrPS4
@ CCK_ClangABI4OrPS4
Definition: TargetInfo.h:1480
clang::TargetInfo::getTypeConstantSuffix
const char * getTypeConstantSuffix(IntType T) const
Return the constant suffix for the specified integer type enum.
Definition: TargetInfo.cpp:193
clang::TargetInfo::checkCallingConvention
virtual CallingConvCheckResult checkCallingConvention(CallingConv CC) const
Determines whether a given calling convention is valid for the target.
Definition: TargetInfo.h:1469
clang::TransferrableTargetInfo::UseExplicitBitFieldAlignment
unsigned UseExplicitBitFieldAlignment
Whether explicit bit field alignment attributes are honored.
Definition: TargetInfo.h:164
clang::TargetInfo::getDoubleFormat
const llvm::fltSemantics & getDoubleFormat() const
Definition: TargetInfo.h:663
clang::TargetInfo::validateConstraintModifier
virtual bool validateConstraintModifier(StringRef, char, unsigned, std::string &) const
Definition: TargetInfo.h:1089
clang::TargetInfo::fillValidCPUList
virtual void fillValidCPUList(SmallVectorImpl< StringRef > &Values) const
Fill a SmallVectorImpl with the valid values to setCPU.
Definition: TargetInfo.h:1214
clang::TargetInfo::X86_64ABIBuiltinVaList
@ X86_64ABIBuiltinVaList
__builtin_va_list as defined by the x86-64 ABI: http://refspecs.linuxbase.org/elf/x86_64-abi-0....
Definition: TargetInfo.h:287
clang::TargetInfo::getLongWidth
unsigned getLongWidth() const
getLongWidth/Align - Return the size of 'signed long' and 'unsigned long' for this target,...
Definition: TargetInfo.h:456
clang::TargetInfo::ConstraintInfo::Min
int Min
Definition: TargetInfo.h:972
clang::TargetInfo::getIbm128Align
unsigned getIbm128Align() const
Definition: TargetInfo.h:684
clang::TargetInfo::getSuitableAlign
unsigned getSuitableAlign() const
Return the alignment that is the largest alignment ever used for any scalar/SIMD data type on the tar...
Definition: TargetInfo.h:609
clang::TransferrableTargetInfo::LongLongAlign
unsigned char LongLongAlign
Definition: TargetInfo.h:70
clang::TargetInfo::getNewAlign
unsigned getNewAlign() const
Return the largest alignment for which a suitably-sized allocation with '::operator new(size_t)' or '...
Definition: TargetInfo.h:626
clang::TargetInfo::getUnsignedLongAccumScale
unsigned getUnsignedLongAccumScale() const
getUnsignedLongAccumScale/IBits - Return the number of fractional/integral bits in a 'unsigned long _...
Definition: TargetInfo.h:536
clang::TransferrableTargetInfo::DoubleAlign
unsigned char DoubleAlign
Definition: TargetInfo.h:66
clang::TargetInfo::SystemZBuiltinVaList
@ SystemZBuiltinVaList
Definition: TargetInfo.h:301
clang::TargetInfo::getUserLabelPrefix
const char * getUserLabelPrefix() const
Returns the default value of the USER_LABEL_PREFIX macro, which is the prefix given to user symbols b...
Definition: TargetInfo.h:774
clang::TargetInfo::getExnObjectAlignment
virtual unsigned getExnObjectAlignment() const
Return the alignment (in bits) of the thrown exception object.
Definition: TargetInfo.h:742
clang::TransferrableTargetInfo::SigAtomicType
IntType SigAtomicType
Definition: TargetInfo.h:135
clang::TransferrableTargetInfo::LongAccumScale
unsigned char LongAccumScale
Definition: TargetInfo.h:96
clang::TargetInfo::HasAlignMac68kSupport
unsigned HasAlignMac68kSupport
Definition: TargetInfo.h:220
clang::TargetInfo::TheCXXABI
TargetCXXABI TheCXXABI
Definition: TargetInfo.h:214
clang::TargetInfo::getUnsignedShortAccumIBits
unsigned getUnsignedShortAccumIBits() const
Definition: TargetInfo.h:518
clang::TargetInfo::useAddressSpaceMapMangling
bool useAddressSpaceMapMangling() const
Specify if mangling based on address space map should be used or not for language specific address sp...
Definition: TargetInfo.h:870
clang::TargetInfo::hasProtectedVisibility
virtual bool hasProtectedVisibility() const
Does this target support "protected" visibility?
Definition: TargetInfo.h:1161
clang::TransferrableTargetInfo::MaxAlignedAttribute
unsigned MaxAlignedAttribute
If non-zero, specifies a maximum alignment to truncate alignment specified in the aligned attribute o...
Definition: TargetInfo.h:172
clang::TargetInfo::checkCFProtectionReturnSupported
virtual bool checkCFProtectionReturnSupported(DiagnosticsEngine &Diags) const
Check if the target supports CFProtection branch.
Definition: TargetInfo.cpp:168
clang::TargetInfo::getSimdDefaultAlign
unsigned getSimdDefaultAlign() const
Return default simd alignment for the given target.
Definition: TargetInfo.h:735
clang::TargetInfo::useLeadingZeroLengthBitfield
bool useLeadingZeroLengthBitfield() const
Check whether zero length bitfield alignment is respected if they are leading members.
Definition: TargetInfo.h:807
clang::TargetInfo::ConstraintInfo::setEarlyClobber
void setEarlyClobber()
Definition: TargetInfo.h:1022
clang::TargetInfo::getHalfWidth
unsigned getHalfWidth() const
getHalfWidth/Align/Format - Return the size/align/format of 'half'.
Definition: TargetInfo.h:646
clang::TargetInfo::getDefaultAlignForAttributeAligned
unsigned getDefaultAlignForAttributeAligned() const
Return the default alignment for attribute((aligned)) on this target, to be used if no alignment valu...
Definition: TargetInfo.h:613
clang::TargetInfo::getLongDoubleAlign
unsigned getLongDoubleAlign() const
Definition: TargetInfo.h:668
clang::TargetInfo::isTypeSigned
static bool isTypeSigned(IntType T)
Returns true if the type is signed; false otherwise.
Definition: TargetInfo.cpp:330
clang::TargetInfo::getABI
virtual StringRef getABI() const
Get the ABI currently in use.
Definition: TargetInfo.h:1199
clang::TransferrableTargetInfo::UseZeroLengthBitfieldAlignment
unsigned UseZeroLengthBitfieldAlignment
Whether zero length bitfields (e.g., int : 0;) force alignment of the next bitfield.
Definition: TargetInfo.h:157
clang::TargetInfo::RealTypeUsesObjCFPRet
unsigned RealTypeUsesObjCFPRet
Definition: TargetInfo.h:221
clang::TargetInfo::getBFloat16Mangling
virtual const char * getBFloat16Mangling() const
Return the mangled code of bfloat.
Definition: TargetInfo.h:699
clang::TransferrableTargetInfo::UnsignedShort
@ UnsignedShort
Definition: TargetInfo.h:115
clang::DiagnosticsEngine
Concrete class used by the front-end to report problems and issues.
Definition: Diagnostic.h:191
clang::TargetInfo::getCXXABI
TargetCXXABI getCXXABI() const
Get the C++ ABI currently in use.
Definition: TargetInfo.h:1202
clang::TargetInfo::getFloatEvalMethod
virtual unsigned getFloatEvalMethod() const
Return the value for the C99 FLT_EVAL_METHOD macro.
Definition: TargetInfo.h:704
clang::TargetInfo::getSDKVersion
const llvm::VersionTuple & getSDKVersion() const
Definition: TargetInfo.h:1561
clang::TargetInfo
Exposes information about the current target.
Definition: TargetInfo.h:189
clang::TransferrableTargetInfo::MaxTLSAlign
unsigned MaxTLSAlign
Definition: TargetInfo.h:104
clang::TargetInfo::useObjCFP2RetForComplexLongDouble
bool useObjCFP2RetForComplexLongDouble() const
Check whether _Complex long double should use the "fp2ret" flavor of Objective-C message passing on t...
Definition: TargetInfo.h:856
clang::TargetInfo::getFloatAlign
unsigned getFloatAlign() const
Definition: TargetInfo.h:652
clang::TransferrableTargetInfo::DefaultAlignForAttributeAligned
unsigned char DefaultAlignForAttributeAligned
Definition: TargetInfo.h:99
clang::TargetInfo::setCPU
virtual bool setCPU(const std::string &Name)
Target the specified CPU.
Definition: TargetInfo.h:1209
clang::TargetInfo::getCallingConvKind
virtual CallingConvKind getCallingConvKind(bool ClangABICompat4) const
Definition: TargetInfo.cpp:473
clang::TargetInfo::VoidPtrBuiltinVaList
@ VoidPtrBuiltinVaList
typedef void* __builtin_va_list;
Definition: TargetInfo.h:270
clang::OCLTK_Image
@ OCLTK_Image
Definition: TargetInfo.h:180
clang::TargetInfo::hasFloat16Type
virtual bool hasFloat16Type() const
Determine whether the _Float16 type is supported on this target.
Definition: TargetInfo.h:595
clang::TargetInfo::AddlRegName::Names
const char *const Names[5]
Definition: TargetInfo.h:1147
clang::TargetInfo::useBitFieldTypeAlignment
bool useBitFieldTypeAlignment() const
Check whether the alignment of bit-field types is respected when laying out structures.
Definition: TargetInfo.h:795
clang::TransferrableTargetInfo::BFloat16Width
unsigned char BFloat16Width
Definition: TargetInfo.h:64
clang::TargetInfo::adjust
virtual void adjust(DiagnosticsEngine &Diags, LangOptions &Opts)
Set forced language options.
Definition: TargetInfo.cpp:352
clang::TransferrableTargetInfo::WIntType
IntType WIntType
Definition: TargetInfo.h:134
clang::LangOptions::SignReturnAddressScopeKind::None
@ None
No signing for any function.
clang::TargetInfo::getBoolWidth
unsigned getBoolWidth() const
Return the size of '_Bool' and C++ 'bool' for this target, in bits.
Definition: TargetInfo.h:433
clang::TargetInfo::getFractScale
unsigned getFractScale() const
getFractScale - Return the number of fractional bits in a 'signed _Fract' type.
Definition: TargetInfo.h:551
clang::TargetInfo::getLongAccumWidth
unsigned getLongAccumWidth() const
getLongAccumWidth/Align - Return the size of 'signed long _Accum' and 'unsigned long _Accum' for this...
Definition: TargetInfo.h:476
clang::TargetInfo::getCharWidth
unsigned getCharWidth() const
Definition: TargetInfo.h:438
clang::TargetInfo::hasFeature
virtual bool hasFeature(StringRef Feature) const
Determine whether the given target has the given feature.
Definition: TargetInfo.h:1304
llvm::Optional
Definition: LLVM.h:40
clang::TargetInfo::isBigEndian
bool isBigEndian() const
Definition: TargetInfo.h:1440
clang::TargetInfo::validateAsmConstraint
virtual bool validateAsmConstraint(const char *&Name, TargetInfo::ConstraintInfo &info) const =0
clang::TargetInfo::IsRenderScriptTarget
unsigned IsRenderScriptTarget
Definition: TargetInfo.h:226
clang::TargetInfo::getARMCDECoprocMask
uint32_t getARMCDECoprocMask() const
For ARM targets returns a mask defining which coprocessors are configured as Custom Datapath.
Definition: TargetInfo.h:924
clang::TargetInfo::getConstantAddressSpace
virtual llvm::Optional< LangAS > getConstantAddressSpace() const
Return an AST address space which can be used opportunistically for constant global memory.
Definition: TargetInfo.h:1422
clang::TargetInfo::validateCpuSupports
virtual bool validateCpuSupports(StringRef Name) const
Definition: TargetInfo.h:1317
clang::TargetInfo::getUnsignedShortAccumScale
unsigned getUnsignedShortAccumScale() const
getUnsignedShortAccumScale/IBits - Return the number of fractional/integral bits in a 'unsigned short...
Definition: TargetInfo.h:515
clang::TargetInfo::getDWARFAddressSpace
virtual Optional< unsigned > getDWARFAddressSpace(unsigned AddressSpace) const
Definition: TargetInfo.h:1555
clang::TargetInfo::getLongLongWidth
unsigned getLongLongWidth() const
getLongLongWidth/Align - Return the size of 'signed long long' and 'unsigned long long' for this targ...
Definition: TargetInfo.h:461
clang::TargetInfo::getOpenCLBuiltinAddressSpace
virtual LangAS getOpenCLBuiltinAddressSpace(unsigned AS) const
Map from the address space field in builtin description strings to the language address space.
Definition: TargetInfo.h:1408
clang::TargetInfo::GCCRegAlias::Aliases
const char *const Aliases[5]
Definition: TargetInfo.h:1142
clang::TransferrableTargetInfo::BoolAlign
unsigned char BoolAlign
Definition: TargetInfo.h:61
clang::TargetInfo::ConstraintInfo::CI_AllowsMemory
@ CI_AllowsMemory
Definition: TargetInfo.h:962
clang::TransferrableTargetInfo::Float128Align
unsigned char Float128Align
Definition: TargetInfo.h:67
Expression
clang::TargetInfo::getLongAlign
unsigned getLongAlign() const
Definition: TargetInfo.h:457
clang::TargetInfo::HasBFloat16
bool HasBFloat16
Definition: TargetInfo.h:204
clang::TargetInfo::UseAddrSpaceMapMangling
bool UseAddrSpaceMapMangling
Specify if mangling based on address space map should be used or not for language specific address sp...
Definition: TargetInfo.h:314
clang::TransferrableTargetInfo::LongAlign
unsigned char LongAlign
Definition: TargetInfo.h:69
clang::TransferrableTargetInfo::ShortFractWidth
unsigned char ShortFractWidth
Definition: TargetInfo.h:76
clang::TargetInfo::getMaxOpenCLWorkGroupSize
unsigned getMaxOpenCLWorkGroupSize() const
Definition: TargetInfo.h:737
clang::TargetInfo::setSupportedOpenCLOpts
virtual void setSupportedOpenCLOpts()
Set supported OpenCL extensions and optional core features.
Definition: TargetInfo.h:1507
clang::TransferrableTargetInfo::UnsignedLongLong
@ UnsignedLongLong
Definition: TargetInfo.h:121
clang::TargetInfo::AllowAMDGPUUnsafeFPAtomics
unsigned AllowAMDGPUUnsafeFPAtomics
Definition: TargetInfo.h:232
clang::TargetInfo::BuiltinVaListKind
BuiltinVaListKind
The different kinds of __builtin_va_list types defined by the target implementation.
Definition: TargetInfo.h:265
clang::TargetInfo::getShortAccumWidth
unsigned getShortAccumWidth() const
getShortAccumWidth/Align - Return the size of 'signed short _Accum' and 'unsigned short _Accum' for t...
Definition: TargetInfo.h:466
clang::TargetInfo::hasInt128Type
virtual bool hasInt128Type() const
Determine whether the __int128 type is supported on this target.
Definition: TargetInfo.h:578
clang::TransferrableTargetInfo::LongAccumAlign
unsigned char LongAccumAlign
Definition: TargetInfo.h:75
clang::TargetInfo::MaxAtomicPromoteWidth
unsigned char MaxAtomicPromoteWidth
Definition: TargetInfo.h:208
clang::TargetInfo::getVScaleRange
virtual Optional< std::pair< unsigned, unsigned > > getVScaleRange(const LangOptions &LangOpts) const
Returns target-specific min and max values VScale_Range.
Definition: TargetInfo.h:889
clang::TargetInfo::allowAMDGPUUnsafeFPAtomics
bool allowAMDGPUUnsafeFPAtomics() const
Returns whether or not the AMDGPU unsafe floating point atomics are allowed.
Definition: TargetInfo.h:920
clang::TargetInfo::ConstraintInfo::setAllowsRegister
void setAllowsRegister()
Definition: TargetInfo.h:1024
clang::TargetInfo::ConstraintInfo::Name
std::string Name
Definition: TargetInfo.h:979
clang::TransferrableTargetInfo::FloatFormat
const llvm::fltSemantics * FloatFormat
Definition: TargetInfo.h:106
clang::TransferrableTargetInfo::BFloat16Format
const llvm::fltSemantics * BFloat16Format
Definition: TargetInfo.h:106
clang::TransferrableTargetInfo::FractAlign
unsigned char FractAlign
Definition: TargetInfo.h:77
clang::TargetInfo::getPtrDiffType
IntType getPtrDiffType(unsigned AddrSpace) const
Definition: TargetInfo.h:336
clang::TargetInfo::getUInt64Type
IntType getUInt64Type() const
Definition: TargetInfo.h:351
clang::LangOptions::SignReturnAddressKeyKind::AKey
@ AKey
Return address signing uses APIA key.
clang::OCLTK_Default
@ OCLTK_Default
Definition: TargetInfo.h:177
clang::TargetInfo::ARMCDECoprocMask
unsigned ARMCDECoprocMask
Definition: TargetInfo.h:234
clang::TargetInfo::checkCFProtectionBranchSupported
virtual bool checkCFProtectionBranchSupported(DiagnosticsEngine &Diags) const
Check if the target supports CFProtection branch.
Definition: TargetInfo.cpp:162
llvm::RefCountedBase
Definition: LLVM.h:49
clang::TargetInfo::getConstraintRegister
virtual StringRef getConstraintRegister(StringRef Constraint, StringRef Expression) const
Extracts a register from the passed constraint (if it is a single-register constraint) and the asm la...
Definition: TargetInfo.h:954
clang::TargetInfo::ConstraintInfo::setAllowsMemory
void setAllowsMemory()
Definition: TargetInfo.h:1023
AddressSpaces.h
clang::TargetInfo::getMaxAtomicInlineWidth
unsigned getMaxAtomicInlineWidth() const
Return the maximum width lock-free atomic operation which can be inlined given the supported features...
Definition: TargetInfo.h:716
clang::TargetInfo::HasLegalHalfType
bool HasLegalHalfType
Definition: TargetInfo.h:200
clang::TargetInfo::getLongDoubleWidth
unsigned getLongDoubleWidth() const
getLongDoubleWidth/Align/Format - Return the size/align/format of 'long double'.
Definition: TargetInfo.h:667
clang::TransferrableTargetInfo::Float128
@ Float128
Definition: TargetInfo.h:129
clang::TargetInfo::getShortAlign
unsigned getShortAlign() const
Return the alignment of 'signed short' and 'unsigned short' for this target.
Definition: TargetInfo.h:447
CodeGenOptions.h
clang::TargetInfo::ConstraintInfo::setIsReadWrite
void setIsReadWrite()
Definition: TargetInfo.h:1021
clang::TargetInfo::HasAArch64SVETypes
unsigned HasAArch64SVETypes
Definition: TargetInfo.h:228
clang::TargetInfo::getFractAlign
unsigned getFractAlign() const
Definition: TargetInfo.h:487
clang::TargetInfo::getSupportedOpenCLOpts
llvm::StringMap< bool > & getSupportedOpenCLOpts()
Get supported OpenCL extensions and optional core features.
Definition: TargetInfo.h:1532
clang::TargetInfo::ConstraintInfo::setHasMatchingInput
void setHasMatchingInput()
Definition: TargetInfo.h:1025
clang::TargetInfo::useSignedCharForObjCBool
bool useSignedCharForObjCBool() const
Check if the Objective-C built-in boolean type should be signed char.
Definition: TargetInfo.h:786
clang::TransferrableTargetInfo::HalfAlign
unsigned char HalfAlign
Definition: TargetInfo.h:63
clang::TargetInfo::getTargetID
virtual llvm::Optional< std::string > getTargetID() const
Returns the target ID if supported.
Definition: TargetInfo.h:1134
clang::TargetInfo::getLongDoubleMangling
virtual const char * getLongDoubleMangling() const
Return the mangled code of long double.
Definition: TargetInfo.h:688
llvm::MutableArrayRef
Definition: LLVM.h:35
V
#define V(N, I)
Definition: ASTContext.h:3113
clang::TargetInfo::getSignedSizeType
IntType getSignedSizeType() const
Definition: TargetInfo.h:318
clang::TargetInfo::getTypeAlign
unsigned getTypeAlign(IntType T) const
Return the alignment (in bits) of the specified integer type enum.
Definition: TargetInfo.cpp:312
clang::TargetInfo::getLongLongAlign
unsigned getLongLongAlign() const
Definition: TargetInfo.h:462
clang::TargetInfo::ConstraintInfo::ImmRange
struct clang::TargetInfo::ConstraintInfo::@173 ImmRange
clang::TargetInfo::getRegisterWidth
virtual unsigned getRegisterWidth() const
Return the "preferred" register width on this target.
Definition: TargetInfo.h:763
clang::TargetInfo::useZeroLengthBitfieldAlignment
bool useZeroLengthBitfieldAlignment() const
Check whether zero length bitfields should force alignment of the next member.
Definition: TargetInfo.h:801
clang::TargetInfo::getIntPtrType
IntType getIntPtrType() const
Definition: TargetInfo.h:342
clang::TargetInfo::CPUSpecificManglingCharacter
virtual char CPUSpecificManglingCharacter(StringRef Name) const
Definition: TargetInfo.h:1336
clang::TargetInfo::getDefaultCallingConv
virtual CallingConv getDefaultCallingConv() const
Gets the default calling convention for the given target and declaration context.
Definition: TargetInfo.h:1451
clang::TargetInfo::allowsLargerPreferedTypeAlignment
virtual bool allowsLargerPreferedTypeAlignment() const
Whether target allows to overalign ABI-specified preferred alignment.
Definition: TargetInfo.h:1501
clang::TargetInfo::getFloatWidth
unsigned getFloatWidth() const
getFloatWidth/Align/Format - Return the size/align/format of 'float'.
Definition: TargetInfo.h:651
clang::TransferrableTargetInfo::ShortAccumAlign
unsigned char ShortAccumAlign
Definition: TargetInfo.h:73
clang::TransferrableTargetInfo::LongFractWidth
unsigned char LongFractWidth
Definition: TargetInfo.h:78
clang::TransferrableTargetInfo::Float128Format
const llvm::fltSemantics * Float128Format
Definition: TargetInfo.h:107
clang::TargetInfo::isLittleEndian
bool isLittleEndian() const
Definition: TargetInfo.h:1441
clang::LangASMap
unsigned[(unsigned) LangAS::FirstTargetAddressSpace] LangASMap
The type of a lookup table which maps from language-specific address spaces to target-specific ones.
Definition: AddressSpaces.h:67
clang::TargetInfo::getLongFractScale
unsigned getLongFractScale() const
getLongFractScale - Return the number of fractional bits in a 'signed long _Fract' type.
Definition: TargetInfo.h:555
clang::TransferrableTargetInfo::FloatAlign
unsigned char FloatAlign
Definition: TargetInfo.h:65
clang::TargetInfo::getChar32Align
unsigned getChar32Align() const
Definition: TargetInfo.h:643
clang::TargetInfo::getAccumScale
unsigned getAccumScale() const
getAccumScale/IBits - Return the number of fractional/integral bits in a 'signed _Accum' type.
Definition: TargetInfo.h:503
clang::TargetInfo::ConstraintInfo::setRequiresImmediate
void setRequiresImmediate(int Min, int Max)
Definition: TargetInfo.h:1026
clang::OCLTK_ClkEvent
@ OCLTK_ClkEvent
Definition: TargetInfo.h:178
clang::TransferrableTargetInfo::LongFractAlign
unsigned char LongFractAlign
Definition: TargetInfo.h:78
clang::TargetInfo::getPtrDiffTypeV
virtual enum IntType getPtrDiffTypeV(unsigned AddrSpace) const
Definition: TargetInfo.h:1589
clang::TargetInfo::ConstraintInfo::TiedOperand
int TiedOperand
Definition: TargetInfo.h:970
clang::TargetInfo::getNormalizedGCCRegisterName
StringRef getNormalizedGCCRegisterName(StringRef Name, bool ReturnCanonical=false) const
Returns the "normalized" GCC register name.
Definition: TargetInfo.cpp:560
clang::TargetInfo::TargetInfo
TargetInfo(const llvm::Triple &T)
Definition: TargetInfo.cpp:28
clang::TargetInfo::getChar32Type
IntType getChar32Type() const
Definition: TargetInfo.h:349
clang::TargetInfo::AddlRegName::RegNum
const unsigned RegNum
Definition: TargetInfo.h:1148
clang::TargetInfo::getUnsignedAccumIBits
unsigned getUnsignedAccumIBits() const
Definition: TargetInfo.h:529
clang::TransferrableTargetInfo::LongLongWidth
unsigned char LongLongWidth
Definition: TargetInfo.h:70
clang::TargetInfo::SimdDefaultAlign
unsigned short SimdDefaultAlign
Definition: TargetInfo.h:209
clang::TargetInfo::getFloat128Align
unsigned getFloat128Align() const
Definition: TargetInfo.h:676
clang::TargetInfo::getMCountName
const char * getMCountName() const
Returns the name of the mcount instrumentation function.
Definition: TargetInfo.h:777
clang::TargetInfo::noSignedCharForObjCBool
void noSignedCharForObjCBool()
Definition: TargetInfo.h:789
clang::TargetInfo::getUnsignedAccumScale
unsigned getUnsignedAccumScale() const
getUnsignedAccumScale/IBits - Return the number of fractional/integral bits in a 'unsigned _Accum' ty...
Definition: TargetInfo.h:526
LangOptions.h
clang::TargetInfo::initFeatureMap
virtual bool initFeatureMap(llvm::StringMap< bool > &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector< std::string > &FeatureVec) const
Initialize the map with the default set of target features for the CPU this should include all legal ...
Definition: TargetInfo.cpp:460
clang::TargetInfo::getPointerAlign
uint64_t getPointerAlign(unsigned AddrSpace) const
Definition: TargetInfo.h:419
clang::TargetInfo::getMaxTLSAlign
unsigned getMaxTLSAlign() const
Return the maximum alignment (in bits) of a TLS variable.
Definition: TargetInfo.h:1369
clang::TargetInfo::isValidCPUName
virtual bool isValidCPUName(StringRef Name) const
brief Determine whether this TargetInfo supports the given CPU name.
Definition: TargetInfo.h:1222
clang::TransferrableTargetInfo::UseLeadingZeroLengthBitfield
unsigned UseLeadingZeroLengthBitfield
Whether zero length bitfield alignment is respected if they are the leading members.
Definition: TargetInfo.h:161
clang::TargetInfo::ConstraintInfo::CI_ImmediateConstant
@ CI_ImmediateConstant
Definition: TargetInfo.h:966
clang::TargetInfo::hasFloat128Type
virtual bool hasFloat128Type() const
Determine whether the __float128 type is supported on this target.
Definition: TargetInfo.h:592
clang::TransferrableTargetInfo::NoFloat
@ NoFloat
Definition: TargetInfo.h:125
clang::TransferrableTargetInfo::Ibm128Align
unsigned char Ibm128Align
Definition: TargetInfo.h:67
clang::TargetInfo::CCCR_OK
@ CCCR_OK
Definition: TargetInfo.h:1459
clang::TargetInfo::getMaxPointerWidth
virtual uint64_t getMaxPointerWidth() const
Return the maximum width of pointers on this target.
Definition: TargetInfo.h:424
clang::OCLTK_Queue
@ OCLTK_Queue
Definition: TargetInfo.h:182
clang::TargetInfo::getPlatformMinVersion
VersionTuple getPlatformMinVersion() const
Retrieve the minimum desired version of the platform, to which the program should be compiled.
Definition: TargetInfo.h:1438
clang::TargetInfo::getWCharWidth
unsigned getWCharWidth() const
getWCharWidth/Align - Return the size of 'wchar_t' for this target, in bits.
Definition: TargetInfo.h:632
clang::TargetInfo::getLongAccumAlign
unsigned getLongAccumAlign() const
Definition: TargetInfo.h:477
clang::TargetInfo::getMaxAlignedAttribute
unsigned getMaxAlignedAttribute() const
Get the maximum alignment in bits for a static variable with aligned attribute.
Definition: TargetInfo.h:819
clang::TargetInfo::getGCCRegAliases
virtual ArrayRef< GCCRegAlias > getGCCRegAliases() const =0
clang::TargetInfo::NoAsmVariants
bool NoAsmVariants
Definition: TargetInfo.h:199
clang::TransferrableTargetInfo::HalfWidth
unsigned char HalfWidth
Definition: TargetInfo.h:63
clang::TargetInfo::validateCpuIs
virtual bool validateCpuIs(StringRef Name) const
Definition: TargetInfo.h:1327
clang::TargetInfo::getTargetBuiltins
virtual ArrayRef< Builtin::Info > getTargetBuiltins() const =0
Return information about target-specific builtins for the current primary target, and info about whic...
clang::getLangASFromTargetAS
LangAS getLangASFromTargetAS(unsigned TargetAS)
Definition: AddressSpaces.h:80
clang::TargetInfo::getIbm128Mangling
virtual const char * getIbm128Mangling() const
Return the mangled code of __ibm128.
Definition: TargetInfo.h:694
clang::TargetInfo::getFloatFormat
const llvm::fltSemantics & getFloatFormat() const
Definition: TargetInfo.h:653
clang::CallingConv
CallingConv
CallingConv - Specifies the calling convention that a function uses.
Definition: Specifiers.h:254
clang::TargetInfo::setFPMath
virtual bool setFPMath(StringRef Name)
Use the specified unit for FP math.
Definition: TargetInfo.h:1247
clang::TargetInfo::getNullPointerValue
virtual uint64_t getNullPointerValue(LangAS AddrSpace) const
Get integer value for null pointer.
Definition: TargetInfo.h:430
clang::TargetInfo::isValidTuneCPUName
virtual bool isValidTuneCPUName(StringRef Name) const
brief Determine whether this TargetInfo supports the given CPU name for
Definition: TargetInfo.h:1228
clang::TargetInfo::resetDataLayout
void resetDataLayout(StringRef DL, const char *UserLabelPrefix="")
Definition: TargetInfo.cpp:156
clang::TargetInfo::getFloat128Format
const llvm::fltSemantics & getFloat128Format() const
Definition: TargetInfo.h:677
clang::TargetInfo::isTLSSupported
bool isTLSSupported() const
Whether the target supports thread-local storage.
Definition: TargetInfo.h:1361
clang::TargetInfo::supportsTargetAttributeTune
virtual bool supportsTargetAttributeTune() const
brief Determine whether this TargetInfo supports tune in target attribute.
Definition: TargetInfo.h:1233
clang::TargetInfo::GCCRegAlias
Definition: TargetInfo.h:1141
clang::TargetInfo::getCUDABuiltinAddressSpace
virtual LangAS getCUDABuiltinAddressSpace(unsigned AS) const
Map from the address space field in builtin description strings to the language address space.
Definition: TargetInfo.h:1414
clang::TargetInfo::CreateTargetInfo
static TargetInfo * CreateTargetInfo(DiagnosticsEngine &Diags, const std::shared_ptr< TargetOptions > &Opts)
Construct a target for the given options.
Definition: Targets.cpp:656
clang::TargetInfo::getHalfFormat
const llvm::fltSemantics & getHalfFormat() const
Definition: TargetInfo.h:648
clang::TargetInfo::getUnwindWordWidth
virtual unsigned getUnwindWordWidth() const
Definition: TargetInfo.h:760
clang::TargetInfo::getLeastIntTypeByWidth
virtual IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const
Return the smallest integer type with at least the specified width.
Definition: TargetInfo.cpp:267
clang::TargetInfo::getRealTypeByWidth
RealType getRealTypeByWidth(unsigned BitWidth, bool ExplicitIEEE) const
Return floating point type with specified width.
Definition: TargetInfo.cpp:282
clang::TargetInfo::validateCPUSpecificCPUDispatch
virtual bool validateCPUSpecificCPUDispatch(StringRef Name) const
Definition: TargetInfo.h:1331
clang::TargetInfo::getDoubleWidth
unsigned getDoubleWidth() const
getDoubleWidth/Align/Format - Return the size/align/format of 'double'.
Definition: TargetInfo.h:661
clang::TargetInfo::ConstraintInfo::getConstraintStr
const std::string & getConstraintStr() const
Definition: TargetInfo.h:988
clang::TransferrableTargetInfo::ShortAccumWidth
unsigned char ShortAccumWidth
Definition: TargetInfo.h:73
clang::TargetInfo::VLASupported
bool VLASupported
Definition: TargetInfo.h:198
clang::TransferrableTargetInfo::Char16Type
IntType Char16Type
Definition: TargetInfo.h:135
clang::TargetInfo::HasStrictFP
bool HasStrictFP
Definition: TargetInfo.h:206
clang::TargetInfo::HasRISCVVTypes
unsigned HasRISCVVTypes
Definition: TargetInfo.h:230
clang::CodeGenOptions
CodeGenOptions - Track various options which control how the code is optimized and passed to the back...
Definition: CodeGenOptions.h:49
clang::TargetInfo::validateOutputSize
virtual bool validateOutputSize(const llvm::StringMap< bool > &FeatureMap, StringRef, unsigned) const
Definition: TargetInfo.h:1077
clang::TargetInfo::getOpenCLTypeAddrSpace
virtual LangAS getOpenCLTypeAddrSpace(OpenCLTypeKind TK) const
Get address space for OpenCL type.
Definition: TargetInfo.cpp:480
clang::TransferrableTargetInfo::AccumAlign
unsigned char AccumAlign
Definition: TargetInfo.h:74
clang::TargetInfo::ConstraintInfo::earlyClobber
bool earlyClobber()
Definition: TargetInfo.h:991
clang::TargetInfo::AAPCSABIBuiltinVaList
@ AAPCSABIBuiltinVaList
__builtin_va_list as defined by ARM AAPCS ABI http://infocenter.arm.com
Definition: TargetInfo.h:292
clang::TargetInfo::getLongAccumScale
unsigned getLongAccumScale() const
getLongAccumScale/IBits - Return the number of fractional/integral bits in a 'signed long _Accum' typ...
Definition: TargetInfo.h:508
clang::TransferrableTargetInfo::BFloat16Align
unsigned char BFloat16Align
Definition: TargetInfo.h:64
clang::TargetInfo::HasFloat128
bool HasFloat128
Definition: TargetInfo.h:202
clang::TargetInfo::getAccumWidth
unsigned getAccumWidth() const
getAccumWidth/Align - Return the size of 'signed _Accum' and 'unsigned _Accum' for this target,...
Definition: TargetInfo.h:471
clang::TransferrableTargetInfo::Ibm128Format
const llvm::fltSemantics * Ibm128Format
Definition: TargetInfo.h:107
TargetCXXABI.h
clang::CC_C
@ CC_C
Definition: Specifiers.h:255
clang::TargetInfo::BranchProtectionInfo::BranchTargetEnforcement
bool BranchTargetEnforcement
Definition: TargetInfo.h:1275
clang::TargetInfo::ConstraintInfo::ConstraintStr
std::string ConstraintStr
Definition: TargetInfo.h:978
clang::TargetInfo::isVLASupported
bool isVLASupported() const
Whether target supports variable-length arrays.
Definition: TargetInfo.h:1372
clang::TargetInfo::getLongFractWidth
unsigned getLongFractWidth() const
getLongFractWidth/Align - Return the size of 'signed long _Fract' and 'unsigned long _Fract' for this...
Definition: TargetInfo.h:491
clang::LangAS
LangAS
Defines the address space values used by the address space qualifier of QualType.
Definition: AddressSpaces.h:25
clang::TargetInfo::defaultsToAIXPowerAlignment
virtual bool defaultsToAIXPowerAlignment() const
Whether target defaults to the power alignment rules of AIX.
Definition: TargetInfo.h:1504
clang::TargetInfo::hasIbm128Type
virtual bool hasIbm128Type() const
Determine whether the __ibm128 type is supported on this target.
Definition: TargetInfo.h:601
clang::TargetInfo::getTriple
const llvm::Triple & getTriple() const
Returns the target triple of the primary target.
Definition: TargetInfo.h:1129
clang::TargetInfo::getSizeType
IntType getSizeType() const
Definition: TargetInfo.h:317
clang::TargetInfo::BranchProtectionInfo
Definition: TargetInfo.h:1270
clang::TargetInfo::AddlRegName
Definition: TargetInfo.h:1146
clang::TargetInfo::getUInt16Type
IntType getUInt16Type() const
Definition: TargetInfo.h:355
clang::TargetInfo::getTargetDefines
virtual void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const =0
===-— Other target property query methods -----------------------—===//
clang::TargetInfo::ConstraintInfo::allowsRegister
bool allowsRegister() const
Definition: TargetInfo.h:992
clang::TargetInfo::getInt16Type
IntType getInt16Type() const
Definition: TargetInfo.h:354
clang::TargetInfo::getBoolAlign
unsigned getBoolAlign() const
Return the alignment of '_Bool' and C++ 'bool' for this target.
Definition: TargetInfo.h:436
clang::TargetInfo::UserLabelPrefix
const char * UserLabelPrefix
Definition: TargetInfo.h:211
clang::TransferrableTargetInfo::PtrDiffType
IntType PtrDiffType
Definition: TargetInfo.h:134
clang::TargetInfo::hasAlignMac68kSupport
bool hasAlignMac68kSupport() const
Check whether this target support '#pragma options align=mac68k'.
Definition: TargetInfo.h:828
clang::TargetInfo::getUIntPtrType
IntType getUIntPtrType() const
Definition: TargetInfo.h:343
clang::TargetInfo::getBFloat16Width
unsigned getBFloat16Width() const
getBFloat16Width/Align/Format - Return the size/align/format of '__bf16'.
Definition: TargetInfo.h:656
clang::TargetInfo::setFeatureEnabled
virtual void setFeatureEnabled(llvm::StringMap< bool > &Features, StringRef Name, bool Enabled) const
Enable or disable a specific target feature; the feature name must be valid.
Definition: TargetInfo.h:1259
clang::TargetInfo::getTargetOpts
TargetOptions & getTargetOpts() const
Retrieve the target options.
Definition: TargetInfo.h:258
clang::TargetInfo::ConstraintInfo::Flags
unsigned Flags
Definition: TargetInfo.h:969
clang::TargetOptions::ForceEnableInt128
bool ForceEnableInt128
If given, enables support for __int128_t and __uint128_t types.
Definition: TargetOptions.h:72
clang::TargetInfo::ConstraintInfo::setRequiresImmediate
void setRequiresImmediate(llvm::ArrayRef< int > Exacts)
Definition: TargetInfo.h:1032
clang::TargetInfo::getTypeName
static const char * getTypeName(IntType T)
Return the user string for the specified integer type enum.
Definition: TargetInfo.cpp:175
clang::OCLTK_Event
@ OCLTK_Event
Definition: TargetInfo.h:179
clang::TargetInfo::ConstraintInfo::Max
int Max
Definition: TargetInfo.h:973
clang::TargetInfo::validateInputConstraint
bool validateInputConstraint(MutableArrayRef< ConstraintInfo > OutputConstraints, ConstraintInfo &info) const
Definition: TargetInfo.cpp:698
clang::TargetInfo::TLSSupported
bool TLSSupported
Definition: TargetInfo.h:197
clang::TargetInfo::~TargetInfo
virtual ~TargetInfo()
Definition: TargetInfo.cpp:154
clang::TargetInfo::ConstraintInfo::isConstrained
bool isConstrained
Definition: TargetInfo.h:974
clang::TargetInfo::HasIbm128
bool HasIbm128
Definition: TargetInfo.h:205
clang::TargetInfo::getUnsignedFractScale
unsigned getUnsignedFractScale() const
getUnsignedFractScale - Return the number of fractional bits in a 'unsigned _Fract' type.
Definition: TargetInfo.h:566
clang::TargetInfo::hasBuiltinAtomic
virtual bool hasBuiltinAtomic(uint64_t AtomicSizeInBits, uint64_t AlignmentInBits) const
Returns true if the given target supports lock-free atomic operations at the specified width and alig...
Definition: TargetInfo.h:722
clang::TargetInfo::validateTarget
virtual bool validateTarget(DiagnosticsEngine &Diags) const
Check the target is valid after it is fully initialized.
Definition: TargetInfo.h:1566
clang::TargetInfo::ConstraintInfo::hasMatchingInput
bool hasMatchingInput() const
Return true if this output operand has a matching (tied) input operand.
Definition: TargetInfo.h:997
clang::TargetInfo::getIntMaxTWidth
unsigned getIntMaxTWidth() const
Return the size of intmax_t and uintmax_t for this target, in bits.
Definition: TargetInfo.h:755
clang::TargetInfo::PlatformName
StringRef PlatformName
Definition: TargetInfo.h:217
clang::TransferrableTargetInfo::ProcessIDType
IntType ProcessIDType
Definition: TargetInfo.h:136
clang::TargetInfo::getCPUCacheLineSize
virtual Optional< unsigned > getCPUCacheLineSize() const
Definition: TargetInfo.h:1352
TargetOptions.h
clang::TargetInfo::isValidClobber
bool isValidClobber(StringRef Name) const
Returns whether the passed in string is a valid clobber in an inline asm statement.
Definition: TargetInfo.cpp:507
clang::TargetInfo::BigEndian
bool BigEndian
Definition: TargetInfo.h:196
clang::TransferrableTargetInfo::DoubleWidth
unsigned char DoubleWidth
Definition: TargetInfo.h:66
clang::TargetInfo::MCountName
const char * MCountName
Definition: TargetInfo.h:212
clang::TargetInfo::getChar32Width
unsigned getChar32Width() const
getChar32Width/Align - Return the size of 'char32_t' for this target, in bits.
Definition: TargetInfo.h:642
clang::TransferrableTargetInfo::NoInt
@ NoInt
Definition: TargetInfo.h:111
clang::TargetInfo::AddrSpaceMap
const LangASMap * AddrSpaceMap
Definition: TargetInfo.h:215
clang::TargetInfo::getShortAccumScale
unsigned getShortAccumScale() const
getShortAccumScale/IBits - Return the number of fractional/integral bits in a 'signed short _Accum' t...
Definition: TargetInfo.h:496
clang::TargetInfo::getShortAccumAlign
unsigned getShortAccumAlign() const
Definition: TargetInfo.h:467
clang::TargetInfo::getWIntType
IntType getWIntType() const
Definition: TargetInfo.h:347
clang::TargetInfo::ConstraintInfo::hasTiedOperand
bool hasTiedOperand() const
Return true if this input operand is a matching constraint that ties it to an output operand.
Definition: TargetInfo.h:1004
llvm::ArrayRef
Definition: LLVM.h:34
clang::TargetInfo::adjustTargetOptions
virtual void adjustTargetOptions(const CodeGenOptions &CGOpts, TargetOptions &TargetOpts) const
Adjust target options based on codegen options.
Definition: TargetInfo.h:1187
Value
Value
Definition: UninitializedValues.cpp:102
clang::TransferrableTargetInfo::LongDoubleFormat
const llvm::fltSemantics * LongDoubleFormat
Definition: TargetInfo.h:107
clang::TargetInfo::getFloat128Mangling
virtual const char * getFloat128Mangling() const
Return the mangled code of __float128.
Definition: TargetInfo.h:691
clang::TargetInfo::getChar16Width
unsigned getChar16Width() const
getChar16Width/Align - Return the size of 'char16_t' for this target, in bits.
Definition: TargetInfo.h:637
clang::TargetInfo::CharPtrBuiltinVaList
@ CharPtrBuiltinVaList
typedef char* __builtin_va_list;
Definition: TargetInfo.h:267
clang::TargetInfo::getCPUSpecificCPUDispatchFeatures
virtual void getCPUSpecificCPUDispatchFeatures(StringRef Name, llvm::SmallVectorImpl< StringRef > &Features) const
Definition: TargetInfo.h:1344
clang::TargetInfo::getIbm128Width
unsigned getIbm128Width() const
getIbm128Width/Align/Format - Return the size/align/format of '__ibm128'.
Definition: TargetInfo.h:683
clang::TargetInfo::hasNoAsmVariants
bool hasNoAsmVariants() const
Return true if {|} are normal characters in the asm string.
Definition: TargetInfo.h:1387
clang::TransferrableTargetInfo::ShortAccumScale
unsigned char ShortAccumScale
Definition: TargetInfo.h:94
clang::TargetInfo::getMinGlobalAlign
virtual unsigned getMinGlobalAlign(uint64_t) const
getMinGlobalAlign - Return the minimum alignment of a global variable, unless its alignment is explic...
Definition: TargetInfo.h:619
clang::TargetInfo::checkArithmeticFenceSupported
virtual bool checkArithmeticFenceSupported() const
Controls if __arithmetic_fence is supported in the targeted backend.
Definition: TargetInfo.h:1447
clang::TargetInfo::validateOpenCLTarget
virtual bool validateOpenCLTarget(const LangOptions &Opts, DiagnosticsEngine &Diags) const
Check that OpenCL target has valid options setting based on OpenCL version.
Definition: Targets.cpp:731
clang::TargetInfo::getUnsignedLongAccumIBits
unsigned getUnsignedLongAccumIBits() const
Definition: TargetInfo.h:539
clang::OCLTK_Sampler
@ OCLTK_Sampler
Definition: TargetInfo.h:184
LLVM.h
clang::TargetInfo::ConstraintInfo::getTiedOperand
unsigned getTiedOperand() const
Definition: TargetInfo.h:1005
clang::TargetInfo::getUIntMaxType
IntType getUIntMaxType() const
Definition: TargetInfo.h:333
clang::TargetInfo::MaxOpenCLWorkGroupSize
unsigned MaxOpenCLWorkGroupSize
Definition: TargetInfo.h:236
clang::TargetInfo::getStaticInitSectionSpecifier
virtual const char * getStaticInitSectionSpecifier() const
Return the section to use for C++ static initialization functions.
Definition: TargetInfo.h:1400
clang::TargetInfo::supportAllOpenCLOpts
virtual void supportAllOpenCLOpts(bool V=true)
Definition: TargetInfo.h:1509
clang::TargetInfo::getIntMaxType
IntType getIntMaxType() const
Definition: TargetInfo.h:332
clang::TransferrableTargetInfo::DoubleFormat
const llvm::fltSemantics * DoubleFormat
Definition: TargetInfo.h:107
clang::TargetInfo::MaxAtomicInlineWidth
unsigned char MaxAtomicInlineWidth
Definition: TargetInfo.h:208
clang::TargetInfo::setCommandLineOpenCLOpts
virtual void setCommandLineOpenCLOpts()
Set supported OpenCL extensions as written on command line.
Definition: TargetInfo.h:1516
clang::TargetInfo::getZeroLengthBitfieldBoundary
unsigned getZeroLengthBitfieldBoundary() const
Get the fixed alignment value in bits for a member that follows a zero length bitfield.
Definition: TargetInfo.h:813
clang::TargetInfo::getFloat128Width
unsigned getFloat128Width() const
getFloat128Width/Align/Format - Return the size/align/format of '__float128'.
Definition: TargetInfo.h:675
clang::TargetInfo::hasPS4DLLImportExport
virtual bool hasPS4DLLImportExport() const
Definition: TargetInfo.h:1171
clang::TargetInfo::fillValidTuneCPUList
virtual void fillValidTuneCPUList(SmallVectorImpl< StringRef > &Values) const
Fill a SmallVectorImpl with the valid values for tuning CPU.
Definition: TargetInfo.h:1217
clang::TargetInfo::ConstraintInfo::isReadWrite
bool isReadWrite() const
Definition: TargetInfo.h:990
clang::TargetInfo::hasSjLjLowering
virtual bool hasSjLjLowering() const
Controls if __builtin_longjmp / __builtin_setjmp can be lowered to llvm.eh.sjlj.longjmp / llvm....
Definition: TargetInfo.h:1488
clang::TargetInfo::getFractWidth
unsigned getFractWidth() const
getFractWidth/Align - Return the size of 'signed _Fract' and 'unsigned _Fract' for this target,...
Definition: TargetInfo.h:486
clang::TargetInfo::getBFloat16Align
unsigned getBFloat16Align() const
Definition: TargetInfo.h:657
clang::TargetInfo::ConstraintInfo::setRequiresImmediate
void setRequiresImmediate()
Definition: TargetInfo.h:1041
clang::TargetInfo::getAddressSpaceMap
const LangASMap & getAddressSpaceMap() const
Definition: TargetInfo.h:1404
clang::TargetInfo::getSupportedOpenCLOpts
const llvm::StringMap< bool > & getSupportedOpenCLOpts() const
Get const supported OpenCL extensions and optional core features.
Definition: TargetInfo.h:1537
clang::TransferrableTargetInfo::MaxVectorAlign
unsigned MaxVectorAlign
Definition: TargetInfo.h:103
clang::TargetInfo::validateInputSize
virtual bool validateInputSize(const llvm::StringMap< bool > &FeatureMap, StringRef, unsigned) const
Definition: TargetInfo.h:1083
clang::TargetInfo::getPointerWidthV
virtual uint64_t getPointerWidthV(unsigned AddrSpace) const
Definition: TargetInfo.h:1583
clang::TargetInfo::getIbm128Format
const llvm::fltSemantics & getIbm128Format() const
Definition: TargetInfo.h:685
clang::TargetInfo::getIntAlign
unsigned getIntAlign() const
Definition: TargetInfo.h:452
clang::TransferrableTargetInfo::IntAlign
unsigned char IntAlign
Definition: TargetInfo.h:62
clang::TargetInfo::ConstraintInfo
Definition: TargetInfo.h:959
clang::TransferrableTargetInfo::UseBitFieldTypeAlignment
unsigned UseBitFieldTypeAlignment
Control whether the alignment of bit-field types is respected when laying out structures.
Definition: TargetInfo.h:149
clang::TargetInfo::useExplicitBitFieldAlignment
bool useExplicitBitFieldAlignment() const
Check whether explicit bitfield alignment attributes should be.
Definition: TargetInfo.h:823
clang::LangOptions
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Definition: LangOptions.h:58
clang::TransferrableTargetInfo
Fields controlling how types are laid out in memory; these may need to be copied for targets like AMD...
Definition: TargetInfo.h:59
clang::TransferrableTargetInfo::BoolWidth
unsigned char BoolWidth
Definition: TargetInfo.h:61
clang::TargetInfo::getIntTypeByWidth
virtual IntType getIntTypeByWidth(unsigned BitWidth, bool IsSigned) const
Return integer type with specified width.
Definition: TargetInfo.cpp:252
clang::TargetInfo::getLargeArrayMinWidth
unsigned getLargeArrayMinWidth() const
Definition: TargetInfo.h:708
clang::TargetInfo::handleAsmEscapedChar
virtual llvm::Optional< std::string > handleAsmEscapedChar(char C) const
Replace some escaped characters with another string based on target-specific rules.
Definition: TargetInfo.h:1115
clang::TransferrableTargetInfo::IntType
IntType
===-— Target Data Type Query Methods ----------------------------—===//
Definition: TargetInfo.h:110
clang::TargetInfo::getShortAccumIBits
unsigned getShortAccumIBits() const
Definition: TargetInfo.h:497
clang::TargetInfo::ConstraintInfo::CI_EarlyClobber
@ CI_EarlyClobber
Definition: TargetInfo.h:967
clang::TargetInfo::getChar16Type
IntType getChar16Type() const
Definition: TargetInfo.h:348
clang::TargetInfo::validateBranchProtection
virtual bool validateBranchProtection(StringRef Spec, BranchProtectionInfo &BPI, StringRef &Err) const
Determine if this TargetInfo supports the given branch protection specification.
Definition: TargetInfo.h:1280
clang::TargetInfo::handleTargetFeatures
virtual bool handleTargetFeatures(std::vector< std::string > &Features, DiagnosticsEngine &Diags)
Perform initialization based on the user configured set of features (e.g., +sse4).
Definition: TargetInfo.h:1298
clang::TargetInfo::getShortWidth
unsigned getShortWidth() const
Return the size of 'signed short' and 'unsigned short' for this target, in bits.
Definition: TargetInfo.h:443
clang::TargetInfo::doUnsignedFixedPointTypesHavePadding
bool doUnsignedFixedPointTypesHavePadding() const
In the event this target uses the same number of fractional bits for its unsigned types as it does wi...
Definition: TargetInfo.h:382
clang::LangAS::Default
@ Default
clang::TransferrableTargetInfo::FloatWidth
unsigned char FloatWidth
Definition: TargetInfo.h:65
clang::LangOptions::SignReturnAddressKeyKind
SignReturnAddressKeyKind
Definition: LangOptions.h:268
clang::TargetInfo::getChar16Align
unsigned getChar16Align() const
Definition: TargetInfo.h:638
clang::TargetInfo::multiVersionSortPriority
virtual unsigned multiVersionSortPriority(StringRef Name) const
Definition: TargetInfo.h:1321
clang::TargetInfo::isValidFeatureName
virtual bool isValidFeatureName(StringRef Feature) const
Determine whether this TargetInfo supports the given feature.
Definition: TargetInfo.h:1266
clang::TargetInfo::getGridValue
virtual const llvm::omp::GV & getGridValue() const
Definition: TargetInfo.h:1428
clang::TargetInfo::setMaxAtomicWidth
virtual void setMaxAtomicWidth()
Set the maximum inline or promote width lock-free atomic operation for the given target.
Definition: TargetInfo.h:719
clang::TransferrableTargetInfo::HalfFormat
const llvm::fltSemantics * HalfFormat
Definition: TargetInfo.h:106
clang::OpenCLTypeKind
OpenCLTypeKind
OpenCL type kinds.
Definition: TargetInfo.h:176
clang::TargetInfo::ConstraintInfo::setRequiresImmediate
void setRequiresImmediate(int Exact)
Definition: TargetInfo.h:1037
clang::TransferrableTargetInfo::LongDouble
@ LongDouble
Definition: TargetInfo.h:128
clang::TargetInfo::ComplexLongDoubleUsesFP2Ret
unsigned ComplexLongDoubleUsesFP2Ret
Definition: TargetInfo.h:222
clang::TargetInfo::getDoubleAlign
unsigned getDoubleAlign() const
Definition: TargetInfo.h:662
clang::TargetInfo::getTypeWidth
unsigned getTypeWidth(IntType T) const
Return the width (in bits) of the specified integer type enum.
Definition: TargetInfo.cpp:236
clang::TargetInfo::HasFloat16
bool HasFloat16
Definition: TargetInfo.h:203
clang
Definition: CalledOnceCheck.h:17
clang::TargetInfo::hasStrictFP
virtual bool hasStrictFP() const
Determine whether constrained floating point is supported on this target.
Definition: TargetInfo.h:604
clang::TargetInfo::supportsIFunc
bool supportsIFunc() const
Identify whether this target supports IFuncs.
Definition: TargetInfo.h:1313
clang::TargetInfo::ConstraintInfo::CI_HasMatchingInput
@ CI_HasMatchingInput
Definition: TargetInfo.h:965
clang::TargetInfo::getTypeFormatModifier
static const char * getTypeFormatModifier(IntType T)
Return the printf format modifier for the specified integer type enum.
Definition: TargetInfo.cpp:218
clang::TargetInfo::setAuxTarget
virtual void setAuxTarget(const TargetInfo *Aux)
Definition: TargetInfo.h:1575
clang::TransferrableTargetInfo::Int16Type
IntType Int16Type
Definition: TargetInfo.h:135
clang::TargetInfo::getMaxAtomicPromoteWidth
unsigned getMaxAtomicPromoteWidth() const
Return the maximum width lock-free atomic operation which will ever be supported for the given target...
Definition: TargetInfo.h:713
clang::TargetInfo::allowDebugInfoForExternalRef
virtual bool allowDebugInfoForExternalRef() const
Whether target allows debuginfo types for decl only variables/functions.
Definition: TargetInfo.h:1578
clang::TargetInfo::getPointerWidth
uint64_t getPointerWidth(unsigned AddrSpace) const
Return the width of pointers on this target, for the specified address space.
Definition: TargetInfo.h:416
clang::TargetInfo::hasFeatureEnabled
virtual bool hasFeatureEnabled(const llvm::StringMap< bool > &Features, StringRef Name) const
Check if target has a given feature enabled.
Definition: TargetInfo.h:1252
clang::TargetInfo::getPointerAlignV
virtual uint64_t getPointerAlignV(unsigned AddrSpace) const
Definition: TargetInfo.h:1586
clang::TransferrableTargetInfo::SignedInt
@ SignedInt
Definition: TargetInfo.h:116
clang::TransferrableTargetInfo::MinGlobalAlign
unsigned char MinGlobalAlign
Definition: TargetInfo.h:100
clang::TransferrableTargetInfo::UnsignedLong
@ UnsignedLong
Definition: TargetInfo.h:119
clang::TransferrableTargetInfo::LongAccumWidth
unsigned char LongAccumWidth
Definition: TargetInfo.h:75
clang::TransferrableTargetInfo::SignedLongLong
@ SignedLongLong
Definition: TargetInfo.h:120
clang::TargetInfo::getSigAtomicType
IntType getSigAtomicType() const
Definition: TargetInfo.h:358
clang::TargetInfo::ConstraintInfo::requiresImmediateConstant
bool requiresImmediateConstant() const
Definition: TargetInfo.h:1010
clang::TransferrableTargetInfo::AccumScale
unsigned char AccumScale
Definition: TargetInfo.h:95
clang::TargetInfo::getUnsignedPtrDiffType
IntType getUnsignedPtrDiffType(unsigned AddrSpace) const
Definition: TargetInfo.h:339
clang::TargetInfo::CCK_MicrosoftWin64
@ CCK_MicrosoftWin64
Definition: TargetInfo.h:1481
clang::TargetInfo::CCCR_Error
@ CCCR_Error
Definition: TargetInfo.h:1462
clang::TransferrableTargetInfo::PaddingOnUnsignedFixedPoint
bool PaddingOnUnsignedFixedPoint
Definition: TargetInfo.h:85
clang::TargetInfo::getPlatformName
StringRef getPlatformName() const
Retrieve the name of the platform as it is used in the availability attribute.
Definition: TargetInfo.h:1434
clang::TargetInfo::supportsMultiVersioning
bool supportsMultiVersioning() const
Identify whether this target supports multiversioning of functions, which requires support for cpu_su...
Definition: TargetInfo.h:1310
clang::TargetInfo::getUnsignedShortFractScale
unsigned getUnsignedShortFractScale() const
getUnsignedShortFractScale - Return the number of fractional bits in a 'unsigned short _Fract' type.
Definition: TargetInfo.h:559
clang::TargetInfo::getLargeArrayAlign
unsigned getLargeArrayAlign() const
Definition: TargetInfo.h:709
clang::TargetInfo::getGCCRegNames
virtual ArrayRef< const char * > getGCCRegNames() const =0
clang::TargetInfo::getCharAlign
unsigned getCharAlign() const
Definition: TargetInfo.h:439
clang::TargetInfo::convertConstraint
virtual std::string convertConstraint(const char *&Constraint) const
Definition: TargetInfo.h:1106
clang::TargetInfo::getEHDataRegisterNumber
virtual int getEHDataRegisterNumber(unsigned RegNo) const
Return the register number that __builtin_eh_return_regno would return with the specified argument.
Definition: TargetInfo.h:1395
clang::TargetInfo::ConstraintInfo::isValidAsmImmediate
bool isValidAsmImmediate(const llvm::APInt &Value) const
Definition: TargetInfo.h:1013
clang::TargetInfo::getShortFractAlign
unsigned getShortFractAlign() const
Definition: TargetInfo.h:482
clang::TargetInfo::hasAArch64SVETypes
bool hasAArch64SVETypes() const
Returns whether or not the AArch64 SVE built-in types are available on this target.
Definition: TargetInfo.h:912
clang::TargetOptions::SDKVersion
llvm::VersionTuple SDKVersion
The version of the SDK which was used during the compilation.
Definition: TargetOptions.h:93
clang::TargetInfo::ConstraintInfo::CI_None
@ CI_None
Definition: TargetInfo.h:961
clang::TargetInfo::getAccumAlign
unsigned getAccumAlign() const
Definition: TargetInfo.h:472
clang::TargetInfo::getInt64Type
IntType getInt64Type() const
Definition: TargetInfo.h:350
clang::TargetInfo::getShortFractScale
unsigned getShortFractScale() const
getShortFractScale - Return the number of fractional bits in a 'signed short _Fract' type.
Definition: TargetInfo.h:547
clang::TargetInfo::getHalfAlign
unsigned getHalfAlign() const
Definition: TargetInfo.h:647
clang::TargetInfo::hasLegalHalfType
virtual bool hasLegalHalfType() const
Determine whether _Float16 is supported on this target.
Definition: TargetInfo.h:589
clang::TargetOptions
Options for controlling the target.
Definition: TargetOptions.h:26
clang::OCLTK_ReserveID
@ OCLTK_ReserveID
Definition: TargetInfo.h:183
clang::TargetInfo::getBFloat16Format
const llvm::fltSemantics & getBFloat16Format() const
Definition: TargetInfo.h:658
clang::TargetInfo::getLongFractAlign
unsigned getLongFractAlign() const
Definition: TargetInfo.h:492
clang::TargetInfo::SSERegParmMax
unsigned char SSERegParmMax
Definition: TargetInfo.h:213
llvm::SmallVectorImpl
Definition: LLVM.h:39
clang::OCLTK_Pipe
@ OCLTK_Pipe
Definition: TargetInfo.h:181
clang::TargetInfo::getGCCAddlRegNames
virtual ArrayRef< AddlRegName > getGCCAddlRegNames() const
Definition: TargetInfo.h:1594
clang::TargetInfo::ConstraintInfo::setTiedOperand
void setTiedOperand(unsigned N, ConstraintInfo &Output)
Indicate that this is an input operand that is tied to the specified output operand.
Definition: TargetInfo.h:1049
clang::TargetInfo::setABI
virtual bool setABI(const std::string &Name)
Use the specified ABI.
Definition: TargetInfo.h:1240
clang::TransferrableTargetInfo::SignedShort
@ SignedShort
Definition: TargetInfo.h:114
clang::TargetInfo::isSPRegName
virtual bool isSPRegName(StringRef) const
Definition: TargetInfo.h:946
clang::TargetInfo::hasBFloat16Type
virtual bool hasBFloat16Type() const
Determine whether the _BFloat16 type is supported on this target.
Definition: TargetInfo.h:598
clang::TargetInfo::AArch64ABIBuiltinVaList
@ AArch64ABIBuiltinVaList
__builtin_va_list as defined by the AArch64 ABI http://infocenter.arm.com/help/topic/com....
Definition: TargetInfo.h:274
clang::TransferrableTargetInfo::NewAlign
unsigned short NewAlign
Definition: TargetInfo.h:102
clang::TargetInfo::shouldDLLImportComdatSymbols
virtual bool shouldDLLImportComdatSymbols() const
Does this target aim for semantic compatibility with Microsoft C++ code using dllimport/export attrib...
Definition: TargetInfo.h:1165
clang::TransferrableTargetInfo::IntWidth
unsigned char IntWidth
Definition: TargetInfo.h:62
clang::TransferrableTargetInfo::WCharType
IntType WCharType
Definition: TargetInfo.h:134
clang::TargetInfo::ConstraintInfo::ImmSet
llvm::SmallSet< int, 4 > ImmSet
Definition: TargetInfo.h:976
clang::TransferrableTargetInfo::PointerWidth
unsigned char PointerWidth
Definition: TargetInfo.h:60
clang::TransferrableTargetInfo::Float
@ Float
Definition: TargetInfo.h:126
clang::TargetInfo::PowerABIBuiltinVaList
@ PowerABIBuiltinVaList
__builtin_va_list as defined by the Power ABI: https://www.power.org /resources/downloads/Power-Arch-...
Definition: TargetInfo.h:283
clang::TargetInfo::ConstraintInfo::CI_AllowsRegister
@ CI_AllowsRegister
Definition: TargetInfo.h:963
clang::TargetInfo::CallingConvCheckResult
CallingConvCheckResult
Definition: TargetInfo.h:1458
clang::MacroBuilder
Definition: MacroBuilder.h:23
clang::TargetInfo::getWCharType
IntType getWCharType() const
Definition: TargetInfo.h:346
clang::TargetInfo::CallingConvKind
CallingConvKind
Definition: TargetInfo.h:1478
clang::TargetInfo::resolveSymbolicName
bool resolveSymbolicName(const char *&Name, ArrayRef< ConstraintInfo > OutputConstraints, unsigned &Index) const
Definition: TargetInfo.cpp:675
clang::TargetInfo::validateGlobalRegisterVariable
virtual bool validateGlobalRegisterVariable(StringRef RegName, unsigned RegSize, bool &HasSizeMismatch) const
Validate register name used for global register variables.
Definition: TargetInfo.h:1063
clang::TargetInfo::HasBuiltinMSVaList
unsigned HasBuiltinMSVaList
Definition: TargetInfo.h:224
clang::TransferrableTargetInfo::ZeroLengthBitfieldBoundary
unsigned ZeroLengthBitfieldBoundary
If non-zero, specifies a fixed alignment value for bitfields that follow zero length bitfield,...
Definition: TargetInfo.h:168
clang::TransferrableTargetInfo::Ibm128
@ Ibm128
Definition: TargetInfo.h:130
clang::TransferrableTargetInfo::Int64Type
IntType Int64Type
Definition: TargetInfo.h:135
clang::TransferrableTargetInfo::LargeArrayMinWidth
unsigned char LargeArrayMinWidth
Definition: TargetInfo.h:68
clang::TransferrableTargetInfo::LongDoubleWidth
unsigned char LongDoubleWidth
Definition: TargetInfo.h:67
clang::TransferrableTargetInfo::UnsignedInt
@ UnsignedInt
Definition: TargetInfo.h:117
clang::TargetCXXABI
The basic abstraction for the target C++ ABI.
Definition: TargetCXXABI.h:28
clang::TargetInfo::ConstraintInfo::ConstraintInfo
ConstraintInfo(StringRef ConstraintStr, StringRef Name)
Definition: TargetInfo.h:981
clang::TransferrableTargetInfo::RealType
RealType
Definition: TargetInfo.h:124
clang::TargetInfo::getIntWidth
unsigned getIntWidth() const
getIntWidth/Align - Return the size of 'signed int' and 'unsigned int' for this target,...
Definition: TargetInfo.h:451
clang::TargetOptions::OpenCLFeaturesMap
llvm::StringMap< bool > OpenCLFeaturesMap
Supported OpenCL extensions and optional core features.
Definition: TargetOptions.h:65
clang::TargetInfo::validateOutputConstraint
bool validateOutputConstraint(ConstraintInfo &Info) const
Definition: TargetInfo.cpp:601
clang::TransferrableTargetInfo::UseSignedCharForObjCBool
unsigned UseSignedCharForObjCBool
Whether Objective-C's built-in boolean type should be signed char.
Definition: TargetInfo.h:142
clang::TargetInfo::copyAuxTarget
void copyAuxTarget(const TargetInfo *Aux)
Copy type and layout related info.
Definition: TargetInfo.cpp:875
clang::TransferrableTargetInfo::LongDoubleAlign
unsigned char LongDoubleAlign
Definition: TargetInfo.h:67
clang::TargetInfo::useFP16ConversionIntrinsics
virtual bool useFP16ConversionIntrinsics() const
Check whether llvm intrinsics such as llvm.convert.to.fp16 should be used to convert to and from __fp...
Definition: TargetInfo.h:864
clang::TransferrableTargetInfo::SizeType
IntType SizeType
Definition: TargetInfo.h:134
clang::TargetInfo::isSEHTrySupported
bool isSEHTrySupported() const
Whether the target supports SEH __try.
Definition: TargetInfo.h:1375
clang::TargetInfo::hasBuiltinMSVaList
bool hasBuiltinMSVaList() const
Returns whether or not type __builtin_ms_va_list type is available on this target.
Definition: TargetInfo.h:905
clang::TargetInfo::getUnsignedLongFractScale
unsigned getUnsignedLongFractScale() const
getUnsignedLongFractScale - Return the number of fractional bits in a 'unsigned long _Fract' type.
Definition: TargetInfo.h:572
clang::TargetInfo::getCorrespondingUnsignedType
static IntType getCorrespondingUnsignedType(IntType T)
Definition: TargetInfo.h:361
clang::TransferrableTargetInfo::SignedLong
@ SignedLong
Definition: TargetInfo.h:118
clang::TargetInfo::hasRISCVVTypes
bool hasRISCVVTypes() const
Returns whether or not the RISC-V V built-in types are available on this target.
Definition: TargetInfo.h:916
clang::TargetInfo::BranchProtectionInfo::SignReturnAddr
LangOptions::SignReturnAddressScopeKind SignReturnAddr
Definition: TargetInfo.h:1271
clang::TargetInfo::HexagonBuiltinVaList
@ HexagonBuiltinVaList
Definition: TargetInfo.h:308
clang::TransferrableTargetInfo::Char32Type
IntType Char32Type
Definition: TargetInfo.h:135
clang::TransferrableTargetInfo::FractWidth
unsigned char FractWidth
Definition: TargetInfo.h:77