LLVM  14.0.0git
DataLayout.h
Go to the documentation of this file.
1 //===- llvm/DataLayout.h - Data size & alignment info -----------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file defines layout properties related to datatype size/offset/alignment
10 // information. It uses lazy annotations to cache information about how
11 // structure types are laid out and used.
12 //
13 // This structure should be created once, filled in if the defaults are not
14 // correct and then passed around by const&. None of the members functions
15 // require modification to the object.
16 //
17 //===----------------------------------------------------------------------===//
18 
19 #ifndef LLVM_IR_DATALAYOUT_H
20 #define LLVM_IR_DATALAYOUT_H
21 
22 #include "llvm/ADT/APInt.h"
23 #include "llvm/ADT/ArrayRef.h"
24 #include "llvm/ADT/STLExtras.h"
25 #include "llvm/ADT/SmallVector.h"
26 #include "llvm/ADT/StringRef.h"
27 #include "llvm/IR/DerivedTypes.h"
28 #include "llvm/IR/Type.h"
29 #include "llvm/Support/Casting.h"
32 #include "llvm/Support/Alignment.h"
34 #include "llvm/Support/TypeSize.h"
35 #include <cassert>
36 #include <cstdint>
37 #include <string>
38 
39 // This needs to be outside of the namespace, to avoid conflict with llvm-c
40 // decl.
41 using LLVMTargetDataRef = struct LLVMOpaqueTargetData *;
42 
43 namespace llvm {
44 
45 class GlobalVariable;
46 class LLVMContext;
47 class Module;
48 class StructLayout;
49 class Triple;
50 class Value;
51 
52 /// Enum used to categorize the alignment types stored by LayoutAlignElem
56  VECTOR_ALIGN = 'v',
57  FLOAT_ALIGN = 'f',
59 };
60 
61 // FIXME: Currently the DataLayout string carries a "preferred alignment"
62 // for types. As the DataLayout is module/global, this should likely be
63 // sunk down to an FTTI element that is queried rather than a global
64 // preference.
65 
66 /// Layout alignment element.
67 ///
68 /// Stores the alignment data associated with a given alignment type (integer,
69 /// vector, float) and type bit width.
70 ///
71 /// \note The unusual order of elements in the structure attempts to reduce
72 /// padding and make the structure slightly more cache friendly.
74  /// Alignment type from \c AlignTypeEnum
75  unsigned AlignType : 8;
76  unsigned TypeBitWidth : 24;
79 
80  static LayoutAlignElem get(AlignTypeEnum align_type, Align abi_align,
81  Align pref_align, uint32_t bit_width);
82 
83  bool operator==(const LayoutAlignElem &rhs) const;
84 };
85 
86 /// Layout pointer alignment element.
87 ///
88 /// Stores the alignment data associated with a given pointer and address space.
89 ///
90 /// \note The unusual order of elements in the structure attempts to reduce
91 /// padding and make the structure slightly more cache friendly.
98 
99  /// Initializer
103 
104  bool operator==(const PointerAlignElem &rhs) const;
105 };
106 
107 /// A parsed version of the target data layout string in and methods for
108 /// querying it.
109 ///
110 /// The target data layout string is specified *by the target* - a frontend
111 /// generating LLVM IR is required to generate the right target data for the
112 /// target being codegen'd to.
113 class DataLayout {
114 public:
115  enum class FunctionPtrAlignType {
116  /// The function pointer alignment is independent of the function alignment.
117  Independent,
118  /// The function pointer alignment is a multiple of the function alignment.
120  };
121 private:
122  /// Defaults to false.
123  bool BigEndian;
124 
125  unsigned AllocaAddrSpace;
126  MaybeAlign StackNaturalAlign;
127  unsigned ProgramAddrSpace;
128  unsigned DefaultGlobalsAddrSpace;
129 
130  MaybeAlign FunctionPtrAlign;
131  FunctionPtrAlignType TheFunctionPtrAlignType;
132 
133  enum ManglingModeT {
134  MM_None,
135  MM_ELF,
136  MM_MachO,
137  MM_WinCOFF,
138  MM_WinCOFFX86,
139  MM_GOFF,
140  MM_Mips,
141  MM_XCOFF
142  };
143  ManglingModeT ManglingMode;
144 
145  SmallVector<unsigned char, 8> LegalIntWidths;
146 
147  /// Primitive type alignment data. This is sorted by type and bit
148  /// width during construction.
149  using AlignmentsTy = SmallVector<LayoutAlignElem, 16>;
150  AlignmentsTy Alignments;
151 
153  findAlignmentLowerBound(AlignTypeEnum AlignType, uint32_t BitWidth) const {
154  return const_cast<DataLayout *>(this)->findAlignmentLowerBound(AlignType,
155  BitWidth);
156  }
157 
159  findAlignmentLowerBound(AlignTypeEnum AlignType, uint32_t BitWidth);
160 
161  /// The string representation used to create this DataLayout
162  std::string StringRepresentation;
163 
164  using PointersTy = SmallVector<PointerAlignElem, 8>;
165  PointersTy Pointers;
166 
167  const PointerAlignElem &getPointerAlignElem(uint32_t AddressSpace) const;
168 
169  // The StructType -> StructLayout map.
170  mutable void *LayoutMap = nullptr;
171 
172  /// Pointers in these address spaces are non-integral, and don't have a
173  /// well-defined bitwise representation.
174  SmallVector<unsigned, 8> NonIntegralAddressSpaces;
175 
176  /// Attempts to set the alignment of the given type. Returns an error
177  /// description on failure.
178  Error setAlignment(AlignTypeEnum align_type, Align abi_align,
179  Align pref_align, uint32_t bit_width);
180 
181  /// Attempts to set the alignment of a pointer in the given address space.
182  /// Returns an error description on failure.
183  Error setPointerAlignment(uint32_t AddrSpace, Align ABIAlign, Align PrefAlign,
184  uint32_t TypeByteWidth, uint32_t IndexWidth);
185 
186  /// Internal helper to get alignment for integer of given bitwidth.
187  Align getIntegerAlignment(uint32_t BitWidth, bool abi_or_pref) const;
188 
189  /// Internal helper method that returns requested alignment for type.
190  Align getAlignment(Type *Ty, bool abi_or_pref) const;
191 
192  /// Attempts to parse a target data specification string and reports an error
193  /// if the string is malformed.
194  Error parseSpecifier(StringRef Desc);
195 
196  // Free all internal data structures.
197  void clear();
198 
199 public:
200  /// Constructs a DataLayout from a specification string. See reset().
201  explicit DataLayout(StringRef LayoutDescription) {
202  reset(LayoutDescription);
203  }
204 
205  /// Initialize target data from properties stored in the module.
206  explicit DataLayout(const Module *M);
207 
208  DataLayout(const DataLayout &DL) { *this = DL; }
209 
210  ~DataLayout(); // Not virtual, do not subclass this class
211 
213  clear();
214  StringRepresentation = DL.StringRepresentation;
215  BigEndian = DL.isBigEndian();
216  AllocaAddrSpace = DL.AllocaAddrSpace;
217  StackNaturalAlign = DL.StackNaturalAlign;
218  FunctionPtrAlign = DL.FunctionPtrAlign;
219  TheFunctionPtrAlignType = DL.TheFunctionPtrAlignType;
220  ProgramAddrSpace = DL.ProgramAddrSpace;
221  DefaultGlobalsAddrSpace = DL.DefaultGlobalsAddrSpace;
222  ManglingMode = DL.ManglingMode;
223  LegalIntWidths = DL.LegalIntWidths;
224  Alignments = DL.Alignments;
225  Pointers = DL.Pointers;
226  NonIntegralAddressSpaces = DL.NonIntegralAddressSpaces;
227  return *this;
228  }
229 
230  bool operator==(const DataLayout &Other) const;
231  bool operator!=(const DataLayout &Other) const { return !(*this == Other); }
232 
233  void init(const Module *M);
234 
235  /// Parse a data layout string (with fallback to default values).
236  void reset(StringRef LayoutDescription);
237 
238  /// Parse a data layout string and return the layout. Return an error
239  /// description on failure.
240  static Expected<DataLayout> parse(StringRef LayoutDescription);
241 
242  /// Layout endianness...
243  bool isLittleEndian() const { return !BigEndian; }
244  bool isBigEndian() const { return BigEndian; }
245 
246  /// Returns the string representation of the DataLayout.
247  ///
248  /// This representation is in the same format accepted by the string
249  /// constructor above. This should not be used to compare two DataLayout as
250  /// different string can represent the same layout.
251  const std::string &getStringRepresentation() const {
252  return StringRepresentation;
253  }
254 
255  /// Test if the DataLayout was constructed from an empty string.
256  bool isDefault() const { return StringRepresentation.empty(); }
257 
258  /// Returns true if the specified type is known to be a native integer
259  /// type supported by the CPU.
260  ///
261  /// For example, i64 is not native on most 32-bit CPUs and i37 is not native
262  /// on any known one. This returns false if the integer width is not legal.
263  ///
264  /// The width is specified in bits.
266  return llvm::is_contained(LegalIntWidths, Width);
267  }
268 
270 
271  /// Returns true if the given alignment exceeds the natural stack alignment.
272  bool exceedsNaturalStackAlignment(Align Alignment) const {
273  return StackNaturalAlign && (Alignment > *StackNaturalAlign);
274  }
275 
277  assert(StackNaturalAlign && "StackNaturalAlign must be defined");
278  return *StackNaturalAlign;
279  }
280 
281  unsigned getAllocaAddrSpace() const { return AllocaAddrSpace; }
282 
283  /// Returns the alignment of function pointers, which may or may not be
284  /// related to the alignment of functions.
285  /// \see getFunctionPtrAlignType
286  MaybeAlign getFunctionPtrAlign() const { return FunctionPtrAlign; }
287 
288  /// Return the type of function pointer alignment.
289  /// \see getFunctionPtrAlign
291  return TheFunctionPtrAlignType;
292  }
293 
294  unsigned getProgramAddressSpace() const { return ProgramAddrSpace; }
295  unsigned getDefaultGlobalsAddressSpace() const {
296  return DefaultGlobalsAddrSpace;
297  }
298 
300  return ManglingMode == MM_WinCOFFX86;
301  }
302 
303  /// Returns true if symbols with leading question marks should not receive IR
304  /// mangling. True for Windows mangling modes.
306  return ManglingMode == MM_WinCOFF || ManglingMode == MM_WinCOFFX86;
307  }
308 
309  bool hasLinkerPrivateGlobalPrefix() const { return ManglingMode == MM_MachO; }
310 
312  if (ManglingMode == MM_MachO)
313  return "l";
314  return "";
315  }
316 
317  char getGlobalPrefix() const {
318  switch (ManglingMode) {
319  case MM_None:
320  case MM_ELF:
321  case MM_GOFF:
322  case MM_Mips:
323  case MM_WinCOFF:
324  case MM_XCOFF:
325  return '\0';
326  case MM_MachO:
327  case MM_WinCOFFX86:
328  return '_';
329  }
330  llvm_unreachable("invalid mangling mode");
331  }
332 
334  switch (ManglingMode) {
335  case MM_None:
336  return "";
337  case MM_ELF:
338  case MM_WinCOFF:
339  return ".L";
340  case MM_GOFF:
341  return "@";
342  case MM_Mips:
343  return "$";
344  case MM_MachO:
345  case MM_WinCOFFX86:
346  return "L";
347  case MM_XCOFF:
348  return "L..";
349  }
350  llvm_unreachable("invalid mangling mode");
351  }
352 
353  static const char *getManglingComponent(const Triple &T);
354 
355  /// Returns true if the specified type fits in a native integer type
356  /// supported by the CPU.
357  ///
358  /// For example, if the CPU only supports i32 as a native integer type, then
359  /// i27 fits in a legal integer type but i45 does not.
360  bool fitsInLegalInteger(unsigned Width) const {
361  for (unsigned LegalIntWidth : LegalIntWidths)
362  if (Width <= LegalIntWidth)
363  return true;
364  return false;
365  }
366 
367  /// Layout pointer alignment
368  Align getPointerABIAlignment(unsigned AS) const;
369 
370  /// Return target's alignment for stack-based pointers
371  /// FIXME: The defaults need to be removed once all of
372  /// the backends/clients are updated.
373  Align getPointerPrefAlignment(unsigned AS = 0) const;
374 
375  /// Layout pointer size
376  /// FIXME: The defaults need to be removed once all of
377  /// the backends/clients are updated.
378  unsigned getPointerSize(unsigned AS = 0) const;
379 
380  /// Returns the maximum pointer size over all address spaces.
381  unsigned getMaxPointerSize() const;
382 
383  // Index size used for address calculation.
384  unsigned getIndexSize(unsigned AS) const;
385 
386  /// Return the address spaces containing non-integral pointers. Pointers in
387  /// this address space don't have a well-defined bitwise representation.
389  return NonIntegralAddressSpaces;
390  }
391 
392  bool isNonIntegralAddressSpace(unsigned AddrSpace) const {
393  ArrayRef<unsigned> NonIntegralSpaces = getNonIntegralAddressSpaces();
394  return is_contained(NonIntegralSpaces, AddrSpace);
395  }
396 
399  }
400 
401  bool isNonIntegralPointerType(Type *Ty) const {
402  auto *PTy = dyn_cast<PointerType>(Ty);
403  return PTy && isNonIntegralPointerType(PTy);
404  }
405 
406  /// Layout pointer size, in bits
407  /// FIXME: The defaults need to be removed once all of
408  /// the backends/clients are updated.
409  unsigned getPointerSizeInBits(unsigned AS = 0) const {
410  return getPointerSize(AS) * 8;
411  }
412 
413  /// Returns the maximum pointer size over all address spaces.
414  unsigned getMaxPointerSizeInBits() const {
415  return getMaxPointerSize() * 8;
416  }
417 
418  /// Size in bits of index used for address calculation in getelementptr.
419  unsigned getIndexSizeInBits(unsigned AS) const {
420  return getIndexSize(AS) * 8;
421  }
422 
423  /// Layout pointer size, in bits, based on the type. If this function is
424  /// called with a pointer type, then the type size of the pointer is returned.
425  /// If this function is called with a vector of pointers, then the type size
426  /// of the pointer is returned. This should only be called with a pointer or
427  /// vector of pointers.
428  unsigned getPointerTypeSizeInBits(Type *) const;
429 
430  /// Layout size of the index used in GEP calculation.
431  /// The function should be called with pointer or vector of pointers type.
432  unsigned getIndexTypeSizeInBits(Type *Ty) const;
433 
434  unsigned getPointerTypeSize(Type *Ty) const {
435  return getPointerTypeSizeInBits(Ty) / 8;
436  }
437 
438  /// Size examples:
439  ///
440  /// Type SizeInBits StoreSizeInBits AllocSizeInBits[*]
441  /// ---- ---------- --------------- ---------------
442  /// i1 1 8 8
443  /// i8 8 8 8
444  /// i19 19 24 32
445  /// i32 32 32 32
446  /// i100 100 104 128
447  /// i128 128 128 128
448  /// Float 32 32 32
449  /// Double 64 64 64
450  /// X86_FP80 80 80 96
451  ///
452  /// [*] The alloc size depends on the alignment, and thus on the target.
453  /// These values are for x86-32 linux.
454 
455  /// Returns the number of bits necessary to hold the specified type.
456  ///
457  /// If Ty is a scalable vector type, the scalable property will be set and
458  /// the runtime size will be a positive integer multiple of the base size.
459  ///
460  /// For example, returns 36 for i36 and 80 for x86_fp80. The type passed must
461  /// have a size (Type::isSized() must return true).
462  TypeSize getTypeSizeInBits(Type *Ty) const;
463 
464  /// Returns the maximum number of bytes that may be overwritten by
465  /// storing the specified type.
466  ///
467  /// If Ty is a scalable vector type, the scalable property will be set and
468  /// the runtime size will be a positive integer multiple of the base size.
469  ///
470  /// For example, returns 5 for i36 and 10 for x86_fp80.
472  TypeSize BaseSize = getTypeSizeInBits(Ty);
473  return { (BaseSize.getKnownMinSize() + 7) / 8, BaseSize.isScalable() };
474  }
475 
476  /// Returns the maximum number of bits that may be overwritten by
477  /// storing the specified type; always a multiple of 8.
478  ///
479  /// If Ty is a scalable vector type, the scalable property will be set and
480  /// the runtime size will be a positive integer multiple of the base size.
481  ///
482  /// For example, returns 40 for i36 and 80 for x86_fp80.
484  return 8 * getTypeStoreSize(Ty);
485  }
486 
487  /// Returns true if no extra padding bits are needed when storing the
488  /// specified type.
489  ///
490  /// For example, returns false for i19 that has a 24-bit store size.
491  bool typeSizeEqualsStoreSize(Type *Ty) const {
492  return getTypeSizeInBits(Ty) == getTypeStoreSizeInBits(Ty);
493  }
494 
495  /// Returns the offset in bytes between successive objects of the
496  /// specified type, including alignment padding.
497  ///
498  /// If Ty is a scalable vector type, the scalable property will be set and
499  /// the runtime size will be a positive integer multiple of the base size.
500  ///
501  /// This is the amount that alloca reserves for this type. For example,
502  /// returns 12 or 16 for x86_fp80, depending on alignment.
504  // Round up to the next alignment boundary.
506  }
507 
508  /// Returns the offset in bits between successive objects of the
509  /// specified type, including alignment padding; always a multiple of 8.
510  ///
511  /// If Ty is a scalable vector type, the scalable property will be set and
512  /// the runtime size will be a positive integer multiple of the base size.
513  ///
514  /// This is the amount that alloca reserves for this type. For example,
515  /// returns 96 or 128 for x86_fp80, depending on alignment.
517  return 8 * getTypeAllocSize(Ty);
518  }
519 
520  /// Returns the minimum ABI-required alignment for the specified type.
521  /// FIXME: Deprecate this function once migration to Align is over.
522  uint64_t getABITypeAlignment(Type *Ty) const;
523 
524  /// Returns the minimum ABI-required alignment for the specified type.
525  Align getABITypeAlign(Type *Ty) const;
526 
527  /// Helper function to return `Alignment` if it's set or the result of
528  /// `getABITypeAlignment(Ty)`, in any case the result is a valid alignment.
530  Type *Ty) const {
531  return Alignment ? *Alignment : getABITypeAlign(Ty);
532  }
533 
534  /// Returns the minimum ABI-required alignment for an integer type of
535  /// the specified bitwidth.
537  return getIntegerAlignment(BitWidth, /* abi_or_pref */ true);
538  }
539 
540  /// Returns the preferred stack/global alignment for the specified
541  /// type.
542  ///
543  /// This is always at least as good as the ABI alignment.
544  /// FIXME: Deprecate this function once migration to Align is over.
546 
547  /// Returns the preferred stack/global alignment for the specified
548  /// type.
549  ///
550  /// This is always at least as good as the ABI alignment.
551  Align getPrefTypeAlign(Type *Ty) const;
552 
553  /// Returns an integer type with size at least as big as that of a
554  /// pointer in the given address space.
555  IntegerType *getIntPtrType(LLVMContext &C, unsigned AddressSpace = 0) const;
556 
557  /// Returns an integer (vector of integer) type with size at least as
558  /// big as that of a pointer of the given pointer (vector of pointer) type.
559  Type *getIntPtrType(Type *) const;
560 
561  /// Returns the smallest integer type with size at least as big as
562  /// Width bits.
563  Type *getSmallestLegalIntType(LLVMContext &C, unsigned Width = 0) const;
564 
565  /// Returns the largest legal integer type, or null if none are set.
567  unsigned LargestSize = getLargestLegalIntTypeSizeInBits();
568  return (LargestSize == 0) ? nullptr : Type::getIntNTy(C, LargestSize);
569  }
570 
571  /// Returns the size of largest legal integer type size, or 0 if none
572  /// are set.
573  unsigned getLargestLegalIntTypeSizeInBits() const;
574 
575  /// Returns the type of a GEP index.
576  /// If it was not specified explicitly, it will be the integer type of the
577  /// pointer width - IntPtrType.
578  Type *getIndexType(Type *PtrTy) const;
579 
580  /// Returns the offset from the beginning of the type for the specified
581  /// indices.
582  ///
583  /// Note that this takes the element type, not the pointer type.
584  /// This is used to implement getelementptr.
585  int64_t getIndexedOffsetInType(Type *ElemTy, ArrayRef<Value *> Indices) const;
586 
587  /// Get GEP indices to access Offset inside ElemTy. ElemTy is updated to be
588  /// the result element type and Offset to be the residual offset.
590 
591  /// Returns a StructLayout object, indicating the alignment of the
592  /// struct, its size, and the offsets of its fields.
593  ///
594  /// Note that this information is lazily cached.
595  const StructLayout *getStructLayout(StructType *Ty) const;
596 
597  /// Returns the preferred alignment of the specified global.
598  ///
599  /// This includes an explicitly requested alignment (if the global has one).
600  Align getPreferredAlign(const GlobalVariable *GV) const;
601 };
602 
604  return reinterpret_cast<DataLayout *>(P);
605 }
606 
608  return reinterpret_cast<LLVMTargetDataRef>(const_cast<DataLayout *>(P));
609 }
610 
611 /// Used to lazily calculate structure layout information for a target machine,
612 /// based on the DataLayout structure.
613 class StructLayout final : public TrailingObjects<StructLayout, uint64_t> {
614  uint64_t StructSize;
615  Align StructAlignment;
616  unsigned IsPadded : 1;
617  unsigned NumElements : 31;
618 
619 public:
620  uint64_t getSizeInBytes() const { return StructSize; }
621 
622  uint64_t getSizeInBits() const { return 8 * StructSize; }
623 
624  Align getAlignment() const { return StructAlignment; }
625 
626  /// Returns whether the struct has padding or not between its fields.
627  /// NB: Padding in nested element is not taken into account.
628  bool hasPadding() const { return IsPadded; }
629 
630  /// Given a valid byte offset into the structure, returns the structure
631  /// index that contains it.
633 
635  return llvm::makeMutableArrayRef(getTrailingObjects<uint64_t>(),
636  NumElements);
637  }
638 
640  return llvm::makeArrayRef(getTrailingObjects<uint64_t>(), NumElements);
641  }
642 
643  uint64_t getElementOffset(unsigned Idx) const {
644  assert(Idx < NumElements && "Invalid element idx!");
645  return getMemberOffsets()[Idx];
646  }
647 
648  uint64_t getElementOffsetInBits(unsigned Idx) const {
649  return getElementOffset(Idx) * 8;
650  }
651 
652 private:
653  friend class DataLayout; // Only DataLayout can create this class
654 
656 
657  size_t numTrailingObjects(OverloadToken<uint64_t>) const {
658  return NumElements;
659  }
660 };
661 
662 // The implementation of this method is provided inline as it is particularly
663 // well suited to constant folding when called on a specific Type subclass.
665  assert(Ty->isSized() && "Cannot getTypeInfo() on a type that is unsized!");
666  switch (Ty->getTypeID()) {
667  case Type::LabelTyID:
669  case Type::PointerTyID:
671  case Type::ArrayTyID: {
672  ArrayType *ATy = cast<ArrayType>(Ty);
673  return ATy->getNumElements() *
675  }
676  case Type::StructTyID:
677  // Get the layout annotation... which is lazily created on demand.
678  return TypeSize::Fixed(
679  getStructLayout(cast<StructType>(Ty))->getSizeInBits());
680  case Type::IntegerTyID:
681  return TypeSize::Fixed(Ty->getIntegerBitWidth());
682  case Type::HalfTyID:
683  case Type::BFloatTyID:
684  return TypeSize::Fixed(16);
685  case Type::FloatTyID:
686  return TypeSize::Fixed(32);
687  case Type::DoubleTyID:
688  case Type::X86_MMXTyID:
689  return TypeSize::Fixed(64);
690  case Type::PPC_FP128TyID:
691  case Type::FP128TyID:
692  return TypeSize::Fixed(128);
693  case Type::X86_AMXTyID:
694  return TypeSize::Fixed(8192);
695  // In memory objects this is always aligned to a higher boundary, but
696  // only 80 bits contain information.
697  case Type::X86_FP80TyID:
698  return TypeSize::Fixed(80);
701  VectorType *VTy = cast<VectorType>(Ty);
702  auto EltCnt = VTy->getElementCount();
703  uint64_t MinBits = EltCnt.getKnownMinValue() *
705  return TypeSize(MinBits, EltCnt.isScalable());
706  }
707  default:
708  llvm_unreachable("DataLayout::getTypeSizeInBits(): Unsupported type");
709  }
710 }
711 
712 } // end namespace llvm
713 
714 #endif // LLVM_IR_DATALAYOUT_H
llvm::alignTo
uint64_t alignTo(uint64_t Size, Align A)
Returns a multiple of A needed to store Size bytes.
Definition: Alignment.h:148
llvm::Type::ArrayTyID
@ ArrayTyID
Arrays.
Definition: Type.h:75
llvm::PointerAlignElem::AddressSpace
uint32_t AddressSpace
Definition: DataLayout.h:96
llvm::StructLayout::hasPadding
bool hasPadding() const
Returns whether the struct has padding or not between its fields.
Definition: DataLayout.h:628
TrailingObjects.h
llvm::Type::FloatTyID
@ FloatTyID
32-bit floating point type
Definition: Type.h:58
llvm::Type::isSized
bool isSized(SmallPtrSetImpl< Type * > *Visited=nullptr) const
Return true if it makes sense to take the size of this type.
Definition: Type.h:263
MathExtras.h
llvm::Type::DoubleTyID
@ DoubleTyID
64-bit floating point type
Definition: Type.h:59
llvm::PointerAlignElem::get
static PointerAlignElem get(uint32_t AddressSpace, Align ABIAlign, Align PrefAlign, uint32_t TypeByteWidth, uint32_t IndexWidth)
Initializer.
Definition: DataLayout.cpp:127
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::DataLayout::exceedsNaturalStackAlignment
bool exceedsNaturalStackAlignment(Align Alignment) const
Returns true if the given alignment exceeds the natural stack alignment.
Definition: DataLayout.h:272
llvm::DataLayout::getTypeStoreSizeInBits
TypeSize getTypeStoreSizeInBits(Type *Ty) const
Returns the maximum number of bits that may be overwritten by storing the specified type; always a mu...
Definition: DataLayout.h:483
llvm::lltok::Error
@ Error
Definition: LLToken.h:21
llvm::DataLayout::getIndexTypeSizeInBits
unsigned getIndexTypeSizeInBits(Type *Ty) const
Layout size of the index used in GEP calculation.
Definition: DataLayout.cpp:729
llvm::DataLayout
A parsed version of the target data layout string in and methods for querying it.
Definition: DataLayout.h:113
llvm::DataLayout::getPreferredAlign
Align getPreferredAlign(const GlobalVariable *GV) const
Returns the preferred alignment of the specified global.
Definition: DataLayout.cpp:972
llvm::TypeSize::getFixedSize
ScalarTy getFixedSize() const
Definition: TypeSize.h:426
llvm::DataLayout::getProgramAddressSpace
unsigned getProgramAddressSpace() const
Definition: DataLayout.h:294
llvm::DataLayout::getDefaultGlobalsAddressSpace
unsigned getDefaultGlobalsAddressSpace() const
Definition: DataLayout.h:295
llvm::PointerAlignElem
Layout pointer alignment element.
Definition: DataLayout.h:92
StringRef.h
P
This currently compiles esp xmm0 movsd esp eax eax esp ret We should use not the dag combiner This is because dagcombine2 needs to be able to see through the X86ISD::Wrapper which DAGCombine can t really do The code for turning x load into a single vector load is target independent and should be moved to the dag combiner The code for turning x load into a vector load can only handle a direct load from a global or a direct load from the stack It should be generalized to handle any load from P
Definition: README-SSE.txt:411
llvm::DataLayout::FunctionPtrAlignType::Independent
@ Independent
The function pointer alignment is independent of the function alignment.
llvm::DataLayout::getTypeSizeInBits
TypeSize getTypeSizeInBits(Type *Ty) const
Size examples:
Definition: DataLayout.h:664
TypeSize.h
llvm::SmallVector
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1168
llvm::DataLayout::getPointerTypeSizeInBits
unsigned getPointerTypeSizeInBits(Type *) const
Layout pointer size, in bits, based on the type.
Definition: DataLayout.cpp:718
llvm::DataLayout::getTypeStoreSize
TypeSize getTypeStoreSize(Type *Ty) const
Returns the maximum number of bytes that may be overwritten by storing the specified type.
Definition: DataLayout.h:471
llvm::StructLayout::getMemberOffsets
MutableArrayRef< uint64_t > getMemberOffsets()
Definition: DataLayout.h:634
llvm::DataLayout::getPointerPrefAlignment
Align getPointerPrefAlignment(unsigned AS=0) const
Return target's alignment for stack-based pointers FIXME: The defaults need to be removed once all of...
Definition: DataLayout.cpp:702
ErrorHandling.h
llvm::Type::getPointerAddressSpace
unsigned getPointerAddressSpace() const
Get the address space of this pointer or pointer vector type.
Definition: DerivedTypes.h:734
llvm::GlobalVariable
Definition: GlobalVariable.h:40
llvm::PointerType::getAddressSpace
unsigned getAddressSpace() const
Return the address space of the Pointer type.
Definition: DerivedTypes.h:687
llvm::Type::X86_AMXTyID
@ X86_AMXTyID
AMX vectors (8192 bits, X86 specific)
Definition: Type.h:67
llvm::Type::getTypeID
TypeID getTypeID() const
Return the type id for the type.
Definition: Type.h:135
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:45
llvm::DataLayout::getStructLayout
const StructLayout * getStructLayout(StructType *Ty) const
Returns a StructLayout object, indicating the alignment of the struct, its size, and the offsets of i...
Definition: DataLayout.cpp:676
APInt.h
llvm::DataLayout::getIndexType
Type * getIndexType(Type *PtrTy) const
Returns the type of a GEP index.
Definition: DataLayout.cpp:866
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
llvm::DataLayout::fitsInLegalInteger
bool fitsInLegalInteger(unsigned Width) const
Returns true if the specified type fits in a native integer type supported by the CPU.
Definition: DataLayout.h:360
llvm::DataLayout::getManglingComponent
static const char * getManglingComponent(const Triple &T)
Definition: DataLayout.cpp:153
llvm::PointerAlignElem::TypeByteWidth
uint32_t TypeByteWidth
Definition: DataLayout.h:95
llvm::PointerAlignElem::IndexWidth
uint32_t IndexWidth
Definition: DataLayout.h:97
llvm::AlignTypeEnum
AlignTypeEnum
Enum used to categorize the alignment types stored by LayoutAlignElem.
Definition: DataLayout.h:53
Offset
uint64_t Offset
Definition: ELFObjHandler.cpp:81
llvm::VectorType::getElementType
Type * getElementType() const
Definition: DerivedTypes.h:422
llvm::DataLayout::getMaxPointerSizeInBits
unsigned getMaxPointerSizeInBits() const
Returns the maximum pointer size over all address spaces.
Definition: DataLayout.h:414
llvm::Expected
Tagged union holding either a T or a Error.
Definition: APFloat.h:42
STLExtras.h
llvm::ArrayType
Class to represent array types.
Definition: DerivedTypes.h:357
llvm::DataLayout::getStringRepresentation
const std::string & getStringRepresentation() const
Returns the string representation of the DataLayout.
Definition: DataLayout.h:251
llvm::DataLayout::hasLinkerPrivateGlobalPrefix
bool hasLinkerPrivateGlobalPrefix() const
Definition: DataLayout.h:309
llvm::LinearPolySize::isScalable
bool isScalable() const
Returns whether the size is scaled by a runtime quantity (vscale).
Definition: TypeSize.h:299
llvm::DataLayout::FunctionPtrAlignType::MultipleOfFunctionAlign
@ MultipleOfFunctionAlign
The function pointer alignment is a multiple of the function alignment.
llvm::DataLayout::getValueOrABITypeAlignment
Align getValueOrABITypeAlignment(MaybeAlign Alignment, Type *Ty) const
Helper function to return Alignment if it's set or the result of getABITypeAlignment(Ty),...
Definition: DataLayout.h:529
LLVMTargetDataRef
struct LLVMOpaqueTargetData * LLVMTargetDataRef
Definition: DataLayout.h:41
llvm::DataLayout::operator=
DataLayout & operator=(const DataLayout &DL)
Definition: DataLayout.h:212
llvm::DataLayout::getTypeAllocSizeInBits
TypeSize getTypeAllocSizeInBits(Type *Ty) const
Returns the offset in bits between successive objects of the specified type, including alignment padd...
Definition: DataLayout.h:516
llvm::DataLayout::getIndexSizeInBits
unsigned getIndexSizeInBits(unsigned AS) const
Size in bits of index used for address calculation in getelementptr.
Definition: DataLayout.h:419
llvm::StructLayout::getSizeInBits
uint64_t getSizeInBits() const
Definition: DataLayout.h:622
llvm::DataLayout::operator!=
bool operator!=(const DataLayout &Other) const
Definition: DataLayout.h:231
llvm::MutableArrayRef
MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...
Definition: ArrayRef.h:307
llvm::ArrayType::getNumElements
uint64_t getNumElements() const
Definition: DerivedTypes.h:369
llvm::LayoutAlignElem::ABIAlign
Align ABIAlign
Definition: DataLayout.h:77
llvm::DataLayout::getABITypeAlignment
uint64_t getABITypeAlignment(Type *Ty) const
Returns the minimum ABI-required alignment for the specified type.
Definition: DataLayout.cpp:822
C
(vector float) vec_cmpeq(*A, *B) C
Definition: README_ALTIVEC.txt:86
llvm::DataLayout::doNotMangleLeadingQuestionMark
bool doNotMangleLeadingQuestionMark() const
Returns true if symbols with leading question marks should not receive IR mangling.
Definition: DataLayout.h:305
llvm::DataLayout::getABIIntegerTypeAlignment
Align getABIIntegerTypeAlignment(unsigned BitWidth) const
Returns the minimum ABI-required alignment for an integer type of the specified bitwidth.
Definition: DataLayout.h:536
llvm::StructLayout::getElementOffsetInBits
uint64_t getElementOffsetInBits(unsigned Idx) const
Definition: DataLayout.h:648
llvm::DataLayout::getPointerTypeSize
unsigned getPointerTypeSize(Type *Ty) const
Definition: DataLayout.h:434
llvm::VectorType::getElementCount
ElementCount getElementCount() const
Return an ElementCount instance to represent the (possibly scalable) number of elements in the vector...
Definition: DerivedTypes.h:627
llvm::TypeSize::Fixed
static TypeSize Fixed(ScalarTy MinVal)
Definition: TypeSize.h:423
llvm::MaybeAlign
This struct is a compact representation of a valid (power of two) or undefined (0) alignment.
Definition: Alignment.h:109
llvm::IntegerType
Class to represent integer types.
Definition: DerivedTypes.h:40
llvm::DataLayout::getABITypeAlign
Align getABITypeAlign(Type *Ty) const
Returns the minimum ABI-required alignment for the specified type.
Definition: DataLayout.cpp:826
llvm::LayoutAlignElem
Layout alignment element.
Definition: DataLayout.h:73
llvm::unwrap
Attribute unwrap(LLVMAttributeRef Attr)
Definition: Attributes.h:257
llvm::DataLayout::getLargestLegalIntTypeSizeInBits
unsigned getLargestLegalIntTypeSizeInBits() const
Returns the size of largest legal integer type size, or 0 if none are set.
Definition: DataLayout.cpp:861
llvm::DataLayout::getStackAlignment
Align getStackAlignment() const
Definition: DataLayout.h:276
llvm::LayoutAlignElem::PrefAlign
Align PrefAlign
Definition: DataLayout.h:78
llvm::Type::PointerTyID
@ PointerTyID
Pointers.
Definition: Type.h:73
Align
uint64_t Align
Definition: ELFObjHandler.cpp:83
llvm::DataLayout::getIndexSize
unsigned getIndexSize(unsigned AS) const
Definition: DataLayout.cpp:725
llvm::Align
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition: Alignment.h:39
llvm::AddressSpace
AddressSpace
Definition: NVPTXBaseInfo.h:21
llvm::Type::BFloatTyID
@ BFloatTyID
16-bit floating point type (7-bit significand)
Definition: Type.h:57
llvm::INTEGER_ALIGN
@ INTEGER_ALIGN
Definition: DataLayout.h:55
llvm::Type::getIntegerBitWidth
unsigned getIntegerBitWidth() const
Definition: DerivedTypes.h:97
Type.h
llvm::DataLayout::init
void init(const Module *M)
Definition: DataLayout.cpp:538
llvm::DataLayout::FunctionPtrAlignType
FunctionPtrAlignType
Definition: DataLayout.h:115
llvm::DataLayout::getLinkerPrivateGlobalPrefix
StringRef getLinkerPrivateGlobalPrefix() const
Definition: DataLayout.h:311
llvm::DataLayout::getFunctionPtrAlign
MaybeAlign getFunctionPtrAlign() const
Returns the alignment of function pointers, which may or may not be related to the alignment of funct...
Definition: DataLayout.h:286
llvm::DataLayout::hasMicrosoftFastStdCallMangling
bool hasMicrosoftFastStdCallMangling() const
Definition: DataLayout.h:299
llvm::DataLayout::getPrefTypeAlign
Align getPrefTypeAlign(Type *Ty) const
Returns the preferred stack/global alignment for the specified type.
Definition: DataLayout.cpp:835
llvm::VectorType
Base class of all SIMD vector types.
Definition: DerivedTypes.h:389
llvm::DataLayout::isBigEndian
bool isBigEndian() const
Definition: DataLayout.h:244
llvm::PointerAlignElem::ABIAlign
Align ABIAlign
Definition: DataLayout.h:93
llvm::INVALID_ALIGN
@ INVALID_ALIGN
Definition: DataLayout.h:54
llvm::DataLayout::~DataLayout
~DataLayout()
Definition: DataLayout.cpp:672
llvm::StructLayout
Used to lazily calculate structure layout information for a target machine, based on the DataLayout s...
Definition: DataLayout.h:613
uint64_t
llvm::PointerAlignElem::PrefAlign
Align PrefAlign
Definition: DataLayout.h:94
llvm::DataLayout::getIndexedOffsetInType
int64_t getIndexedOffsetInType(Type *ElemTy, ArrayRef< Value * > Indices) const
Returns the offset from the beginning of the type for the specified indices.
Definition: DataLayout.cpp:876
llvm::FLOAT_ALIGN
@ FLOAT_ALIGN
Definition: DataLayout.h:57
llvm::Type::X86_MMXTyID
@ X86_MMXTyID
MMX vectors (64 bits, X86 specific)
Definition: Type.h:66
llvm::ARM_MB::ST
@ ST
Definition: ARMBaseInfo.h:73
llvm::DataLayout::isLittleEndian
bool isLittleEndian() const
Layout endianness...
Definition: DataLayout.h:243
llvm::LLVMContext
This is an important class for using LLVM in a threaded context.
Definition: LLVMContext.h:68
llvm::StructLayout::getElementContainingOffset
unsigned getElementContainingOffset(uint64_t Offset) const
Given a valid byte offset into the structure, returns the structure index that contains it.
Definition: DataLayout.cpp:82
llvm::DataLayout::isDefault
bool isDefault() const
Test if the DataLayout was constructed from an empty string.
Definition: DataLayout.h:256
llvm::PointerType
Class to represent pointers.
Definition: DerivedTypes.h:632
llvm::is_contained
bool is_contained(R &&Range, const E &Element)
Wrapper function around std::find to detect if an element exists in a container.
Definition: STLExtras.h:1616
ArrayRef.h
llvm::DataLayout::getGlobalPrefix
char getGlobalPrefix() const
Definition: DataLayout.h:317
llvm::SmallVectorImpl< LayoutAlignElem >::const_iterator
typename SuperClass::const_iterator const_iterator
Definition: SmallVector.h:563
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::DataLayout::parse
static Expected< DataLayout > parse(StringRef LayoutDescription)
Parse a data layout string and return the layout.
Definition: DataLayout.cpp:207
llvm::DataLayout::getPrefTypeAlignment
uint64_t getPrefTypeAlignment(Type *Ty) const
Returns the preferred stack/global alignment for the specified type.
Definition: DataLayout.cpp:831
llvm::DataLayout::getPointerABIAlignment
Align getPointerABIAlignment(unsigned AS) const
Layout pointer alignment.
Definition: DataLayout.cpp:698
llvm::DataLayout::getMaxPointerSize
unsigned getMaxPointerSize() const
Returns the maximum pointer size over all address spaces.
Definition: DataLayout.cpp:710
llvm::Module
A Module instance is used to store all the information related to an LLVM module.
Definition: Module.h:67
llvm::DataLayout::DataLayout
DataLayout(const DataLayout &DL)
Definition: DataLayout.h:208
llvm::APInt
Class for arbitrary precision integers.
Definition: APInt.h:75
llvm::Type::FP128TyID
@ FP128TyID
128-bit floating point type (112-bit significand)
Definition: Type.h:61
llvm::wrap
LLVMAttributeRef wrap(Attribute Attr)
Definition: Attributes.h:252
llvm::ArrayRef< unsigned >
llvm::DataLayout::isNonIntegralAddressSpace
bool isNonIntegralAddressSpace(unsigned AddrSpace) const
Definition: DataLayout.h:392
llvm::DataLayout::isNonIntegralPointerType
bool isNonIntegralPointerType(Type *Ty) const
Definition: DataLayout.h:401
llvm::StructType
Class to represent struct types.
Definition: DerivedTypes.h:213
llvm::Type::PPC_FP128TyID
@ PPC_FP128TyID
128-bit floating point type (two 64-bits, PowerPC)
Definition: Type.h:62
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm::StructLayout::getSizeInBytes
uint64_t getSizeInBytes() const
Definition: DataLayout.h:620
llvm_unreachable
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Definition: ErrorHandling.h:134
llvm::DataLayout::isNonIntegralPointerType
bool isNonIntegralPointerType(PointerType *PT) const
Definition: DataLayout.h:397
uint32_t
llvm::VECTOR_ALIGN
@ VECTOR_ALIGN
Definition: DataLayout.h:56
llvm::DataLayout::getNonIntegralAddressSpaces
ArrayRef< unsigned > getNonIntegralAddressSpaces() const
Return the address spaces containing non-integral pointers.
Definition: DataLayout.h:388
DL
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Definition: AArch64SLSHardening.cpp:76
Module
Machine Check Debug Module
Definition: MachineCheckDebugify.cpp:122
llvm::DataLayout::getFunctionPtrAlignType
FunctionPtrAlignType getFunctionPtrAlignType() const
Return the type of function pointer alignment.
Definition: DataLayout.h:290
llvm::DataLayout::getAllocaAddrSpace
unsigned getAllocaAddrSpace() const
Definition: DataLayout.h:281
llvm::DataLayout::isLegalInteger
bool isLegalInteger(uint64_t Width) const
Returns true if the specified type is known to be a native integer type supported by the CPU.
Definition: DataLayout.h:265
llvm::DataLayout::getSmallestLegalIntType
Type * getSmallestLegalIntType(LLVMContext &C, unsigned Width=0) const
Returns the smallest integer type with size at least as big as Width bits.
Definition: DataLayout.cpp:854
llvm::Type::IntegerTyID
@ IntegerTyID
Arbitrary bit width integers.
Definition: Type.h:71
llvm::DataLayout::getIntPtrType
IntegerType * getIntPtrType(LLVMContext &C, unsigned AddressSpace=0) const
Returns an integer type with size at least as big as that of a pointer in the given address space.
Definition: DataLayout.cpp:839
Alignment.h
llvm::DataLayout::typeSizeEqualsStoreSize
bool typeSizeEqualsStoreSize(Type *Ty) const
Returns true if no extra padding bits are needed when storing the specified type.
Definition: DataLayout.h:491
llvm::Type::getIntNTy
static IntegerType * getIntNTy(LLVMContext &C, unsigned N)
Definition: Type.cpp:245
llvm::LayoutAlignElem::operator==
bool operator==(const LayoutAlignElem &rhs) const
Definition: DataLayout.cpp:116
llvm::StructLayout::getElementOffset
uint64_t getElementOffset(unsigned Idx) const
Definition: DataLayout.h:643
llvm::DataLayout::getPrivateGlobalPrefix
StringRef getPrivateGlobalPrefix() const
Definition: DataLayout.h:333
llvm::AGGREGATE_ALIGN
@ AGGREGATE_ALIGN
Definition: DataLayout.h:58
llvm::Type::FixedVectorTyID
@ FixedVectorTyID
Fixed width SIMD vector type.
Definition: Type.h:76
llvm::PointerAlignElem::operator==
bool operator==(const PointerAlignElem &rhs) const
Definition: DataLayout.cpp:141
llvm::TypeSize
Definition: TypeSize.h:417
Casting.h
llvm::BitWidth
constexpr unsigned BitWidth
Definition: BitmaskEnum.h:147
llvm::DataLayout::isIllegalInteger
bool isIllegalInteger(uint64_t Width) const
Definition: DataLayout.h:269
llvm::TargetStackID::Value
Value
Definition: TargetFrameLowering.h:27
llvm::TrailingObjects
See the file comment for details on the usage of the TrailingObjects type.
Definition: TrailingObjects.h:212
llvm::AMDGPU::Hwreg::Width
Width
Definition: SIDefines.h:413
llvm::makeArrayRef
ArrayRef< T > makeArrayRef(const T &OneElt)
Construct an ArrayRef from a single element.
Definition: ArrayRef.h:476
llvm::Type::LabelTyID
@ LabelTyID
Labels.
Definition: Type.h:64
llvm::DataLayout::getLargestLegalIntType
Type * getLargestLegalIntType(LLVMContext &C) const
Returns the largest legal integer type, or null if none are set.
Definition: DataLayout.h:566
llvm::Type::StructTyID
@ StructTyID
Structures.
Definition: Type.h:74
llvm::DataLayout::DataLayout
DataLayout(StringRef LayoutDescription)
Constructs a DataLayout from a specification string. See reset().
Definition: DataLayout.h:201
SmallVector.h
llvm::DataLayout::getGEPIndicesForOffset
SmallVector< APInt > getGEPIndicesForOffset(Type *&ElemTy, APInt &Offset) const
Get GEP indices to access Offset inside ElemTy.
Definition: DataLayout.cpp:927
llvm::SmallVectorImpl< LayoutAlignElem >::iterator
typename SuperClass::iterator iterator
Definition: SmallVector.h:562
llvm::LayoutAlignElem::get
static LayoutAlignElem get(AlignTypeEnum align_type, Align abi_align, Align pref_align, uint32_t bit_width)
Definition: DataLayout.cpp:104
llvm::DataLayout::operator==
bool operator==(const DataLayout &Other) const
Definition: DataLayout.cpp:540
llvm::LayoutAlignElem::AlignType
unsigned AlignType
Alignment type from AlignTypeEnum.
Definition: DataLayout.h:75
llvm::LayoutAlignElem::TypeBitWidth
unsigned TypeBitWidth
Definition: DataLayout.h:76
llvm::DataLayout::reset
void reset(StringRef LayoutDescription)
Parse a data layout string (with fallback to default values).
Definition: DataLayout.cpp:180
llvm::TypeSize::getKnownMinSize
ScalarTy getKnownMinSize() const
Definition: TypeSize.h:427
llvm::Type::ScalableVectorTyID
@ ScalableVectorTyID
Scalable SIMD vector type.
Definition: Type.h:77
DerivedTypes.h
llvm::DataLayout::getPointerSizeInBits
unsigned getPointerSizeInBits(unsigned AS=0) const
Layout pointer size, in bits FIXME: The defaults need to be removed once all of the backends/clients ...
Definition: DataLayout.h:409
llvm::makeMutableArrayRef
MutableArrayRef< T > makeMutableArrayRef(T &OneElt)
Construct a MutableArrayRef from a single element.
Definition: ArrayRef.h:534
llvm::StructLayout::getAlignment
Align getAlignment() const
Definition: DataLayout.h:624
llvm::StructLayout::getMemberOffsets
ArrayRef< uint64_t > getMemberOffsets() const
Definition: DataLayout.h:639
llvm::Type::HalfTyID
@ HalfTyID
16-bit floating point type
Definition: Type.h:56
llvm::Type::X86_FP80TyID
@ X86_FP80TyID
80-bit floating point type (X87)
Definition: Type.h:60
llvm::ArrayType::getElementType
Type * getElementType() const
Definition: DerivedTypes.h:370
llvm::DataLayout::getPointerSize
unsigned getPointerSize(unsigned AS=0) const
Layout pointer size FIXME: The defaults need to be removed once all of the backends/clients are updat...
Definition: DataLayout.cpp:706
Other
Optional< std::vector< StOtherPiece > > Other
Definition: ELFYAML.cpp:1184
llvm::DataLayout::getTypeAllocSize
TypeSize getTypeAllocSize(Type *Ty) const
Returns the offset in bytes between successive objects of the specified type, including alignment pad...
Definition: DataLayout.h:503