LLVM 20.0.0git
TypeSize.h
Go to the documentation of this file.
1//===- TypeSize.h - Wrapper around type sizes -------------------*- 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 provides a struct that can be used to query the size of IR types
10// which may be scalable vectors. It provides convenience operators so that
11// it can be used in much the same way as a single scalar value.
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_SUPPORT_TYPESIZE_H
16#define LLVM_SUPPORT_TYPESIZE_H
17
20
21#include <algorithm>
22#include <cassert>
23#include <cstdint>
24#include <type_traits>
25
26namespace llvm {
27
28/// Reports a diagnostic message to indicate an invalid size request has been
29/// done on a scalable vector. This function may not return.
30void reportInvalidSizeRequest(const char *Msg);
31
32/// StackOffset holds a fixed and a scalable offset in bytes.
34 int64_t Fixed = 0;
35 int64_t Scalable = 0;
36
37 StackOffset(int64_t Fixed, int64_t Scalable)
38 : Fixed(Fixed), Scalable(Scalable) {}
39
40public:
41 StackOffset() = default;
42 static StackOffset getFixed(int64_t Fixed) { return {Fixed, 0}; }
43 static StackOffset getScalable(int64_t Scalable) { return {0, Scalable}; }
44 static StackOffset get(int64_t Fixed, int64_t Scalable) {
45 return {Fixed, Scalable};
46 }
47
48 /// Returns the fixed component of the stack.
49 int64_t getFixed() const { return Fixed; }
50
51 /// Returns the scalable component of the stack.
52 int64_t getScalable() const { return Scalable; }
53
54 // Arithmetic operations.
56 return {Fixed + RHS.Fixed, Scalable + RHS.Scalable};
57 }
59 return {Fixed - RHS.Fixed, Scalable - RHS.Scalable};
60 }
62 Fixed += RHS.Fixed;
63 Scalable += RHS.Scalable;
64 return *this;
65 }
67 Fixed -= RHS.Fixed;
68 Scalable -= RHS.Scalable;
69 return *this;
70 }
71 StackOffset operator-() const { return {-Fixed, -Scalable}; }
72
73 // Equality comparisons.
74 bool operator==(const StackOffset &RHS) const {
75 return Fixed == RHS.Fixed && Scalable == RHS.Scalable;
76 }
77 bool operator!=(const StackOffset &RHS) const {
78 return Fixed != RHS.Fixed || Scalable != RHS.Scalable;
79 }
80
81 // The bool operator returns true iff any of the components is non zero.
82 explicit operator bool() const { return Fixed != 0 || Scalable != 0; }
83};
84
85namespace details {
86
87// Base class for ElementCount and TypeSize below.
88template <typename LeafTy, typename ValueTy> class FixedOrScalableQuantity {
89public:
90 using ScalarTy = ValueTy;
91
92protected:
94 bool Scalable = false;
95
96 constexpr FixedOrScalableQuantity() = default;
99
100 friend constexpr LeafTy &operator+=(LeafTy &LHS, const LeafTy &RHS) {
101 assert((LHS.Quantity == 0 || RHS.Quantity == 0 ||
102 LHS.Scalable == RHS.Scalable) &&
103 "Incompatible types");
104 LHS.Quantity += RHS.Quantity;
105 if (!RHS.isZero())
106 LHS.Scalable = RHS.Scalable;
107 return LHS;
108 }
109
110 friend constexpr LeafTy &operator-=(LeafTy &LHS, const LeafTy &RHS) {
111 assert((LHS.Quantity == 0 || RHS.Quantity == 0 ||
112 LHS.Scalable == RHS.Scalable) &&
113 "Incompatible types");
114 LHS.Quantity -= RHS.Quantity;
115 if (!RHS.isZero())
116 LHS.Scalable = RHS.Scalable;
117 return LHS;
118 }
119
120 friend constexpr LeafTy &operator*=(LeafTy &LHS, ScalarTy RHS) {
121 LHS.Quantity *= RHS;
122 return LHS;
123 }
124
125 friend constexpr LeafTy operator+(const LeafTy &LHS, const LeafTy &RHS) {
126 LeafTy Copy = LHS;
127 return Copy += RHS;
128 }
129
130 friend constexpr LeafTy operator-(const LeafTy &LHS, const LeafTy &RHS) {
131 LeafTy Copy = LHS;
132 return Copy -= RHS;
133 }
134
135 friend constexpr LeafTy operator*(const LeafTy &LHS, ScalarTy RHS) {
136 LeafTy Copy = LHS;
137 return Copy *= RHS;
138 }
139
140 template <typename U = ScalarTy>
141 friend constexpr std::enable_if_t<std::is_signed_v<U>, LeafTy>
142 operator-(const LeafTy &LHS) {
143 LeafTy Copy = LHS;
144 return Copy *= -1;
145 }
146
147public:
148 constexpr bool operator==(const FixedOrScalableQuantity &RHS) const {
149 return Quantity == RHS.Quantity && Scalable == RHS.Scalable;
150 }
151
152 constexpr bool operator!=(const FixedOrScalableQuantity &RHS) const {
153 return Quantity != RHS.Quantity || Scalable != RHS.Scalable;
154 }
155
156 constexpr bool isZero() const { return Quantity == 0; }
157
158 constexpr bool isNonZero() const { return Quantity != 0; }
159
160 explicit operator bool() const { return isNonZero(); }
161
162 /// Add \p RHS to the underlying quantity.
163 constexpr LeafTy getWithIncrement(ScalarTy RHS) const {
164 return LeafTy::get(Quantity + RHS, Scalable);
165 }
166
167 /// Returns the minimum value this quantity can represent.
168 constexpr ScalarTy getKnownMinValue() const { return Quantity; }
169
170 /// Returns whether the quantity is scaled by a runtime quantity (vscale).
171 constexpr bool isScalable() const { return Scalable; }
172
173 /// Returns true if the quantity is not scaled by vscale.
174 constexpr bool isFixed() const { return !Scalable; }
175
176 /// A return value of true indicates we know at compile time that the number
177 /// of elements (vscale * Min) is definitely even. However, returning false
178 /// does not guarantee that the total number of elements is odd.
179 constexpr bool isKnownEven() const { return (getKnownMinValue() & 0x1) == 0; }
180
181 /// This function tells the caller whether the element count is known at
182 /// compile time to be a multiple of the scalar value RHS.
183 constexpr bool isKnownMultipleOf(ScalarTy RHS) const {
184 return getKnownMinValue() % RHS == 0;
185 }
186
187 /// Returns whether or not the callee is known to be a multiple of RHS.
188 constexpr bool isKnownMultipleOf(const FixedOrScalableQuantity &RHS) const {
189 // x % y == 0 => x % y == 0
190 // x % y == 0 => (vscale * x) % y == 0
191 // x % y == 0 => (vscale * x) % (vscale * y) == 0
192 // but
193 // x % y == 0 !=> x % (vscale * y) == 0
194 if (!isScalable() && RHS.isScalable())
195 return false;
196 return getKnownMinValue() % RHS.getKnownMinValue() == 0;
197 }
198
199 // Return the minimum value with the assumption that the count is exact.
200 // Use in places where a scalable count doesn't make sense (e.g. non-vector
201 // types, or vectors in backends which don't support scalable vectors).
202 constexpr ScalarTy getFixedValue() const {
203 assert((!isScalable() || isZero()) &&
204 "Request for a fixed element count on a scalable object");
205 return getKnownMinValue();
206 }
207
208 // For some cases, quantity ordering between scalable and fixed quantity types
209 // cannot be determined at compile time, so such comparisons aren't allowed.
210 //
211 // e.g. <vscale x 2 x i16> could be bigger than <4 x i32> with a runtime
212 // vscale >= 5, equal sized with a vscale of 4, and smaller with
213 // a vscale <= 3.
214 //
215 // All the functions below make use of the fact vscale is always >= 1, which
216 // means that <vscale x 4 x i32> is guaranteed to be >= <4 x i32>, etc.
217
218 static constexpr bool isKnownLT(const FixedOrScalableQuantity &LHS,
220 if (!LHS.isScalable() || RHS.isScalable())
221 return LHS.getKnownMinValue() < RHS.getKnownMinValue();
222 return false;
223 }
224
225 static constexpr bool isKnownGT(const FixedOrScalableQuantity &LHS,
227 if (LHS.isScalable() || !RHS.isScalable())
228 return LHS.getKnownMinValue() > RHS.getKnownMinValue();
229 return false;
230 }
231
232 static constexpr bool isKnownLE(const FixedOrScalableQuantity &LHS,
234 if (!LHS.isScalable() || RHS.isScalable())
235 return LHS.getKnownMinValue() <= RHS.getKnownMinValue();
236 return false;
237 }
238
239 static constexpr bool isKnownGE(const FixedOrScalableQuantity &LHS,
241 if (LHS.isScalable() || !RHS.isScalable())
242 return LHS.getKnownMinValue() >= RHS.getKnownMinValue();
243 return false;
244 }
245
246 /// We do not provide the '/' operator here because division for polynomial
247 /// types does not work in the same way as for normal integer types. We can
248 /// only divide the minimum value (or coefficient) by RHS, which is not the
249 /// same as
250 /// (Min * Vscale) / RHS
251 /// The caller is recommended to use this function in combination with
252 /// isKnownMultipleOf(RHS), which lets the caller know if it's possible to
253 /// perform a lossless divide by RHS.
254 constexpr LeafTy divideCoefficientBy(ScalarTy RHS) const {
255 return LeafTy::get(getKnownMinValue() / RHS, isScalable());
256 }
257
258 constexpr LeafTy multiplyCoefficientBy(ScalarTy RHS) const {
259 return LeafTy::get(getKnownMinValue() * RHS, isScalable());
260 }
261
262 constexpr LeafTy coefficientNextPowerOf2() const {
263 return LeafTy::get(
265 isScalable());
266 }
267
268 /// Returns true if there exists a value X where RHS.multiplyCoefficientBy(X)
269 /// will result in a value whose quantity matches our own.
270 constexpr bool
272 return isScalable() == RHS.isScalable() &&
273 getKnownMinValue() % RHS.getKnownMinValue() == 0;
274 }
275
276 /// Returns a value X where RHS.multiplyCoefficientBy(X) will result in a
277 /// value whose quantity matches our own.
278 constexpr ScalarTy
280 assert(hasKnownScalarFactor(RHS) && "Expected RHS to be a known factor!");
281 return getKnownMinValue() / RHS.getKnownMinValue();
282 }
283
284 /// Printing function.
285 void print(raw_ostream &OS) const {
286 if (isScalable())
287 OS << "vscale x ";
288 OS << getKnownMinValue();
289 }
290};
291
292} // namespace details
293
294// Stores the number of elements for a type and whether this type is fixed
295// (N-Elements) or scalable (e.g., SVE).
296// - ElementCount::getFixed(1) : A scalar value.
297// - ElementCount::getFixed(2) : A vector type holding 2 values.
298// - ElementCount::getScalable(4) : A scalable vector type holding 4 values.
300 : public details::FixedOrScalableQuantity<ElementCount, unsigned> {
301 constexpr ElementCount(ScalarTy MinVal, bool Scalable)
303
304 constexpr ElementCount(
305 const FixedOrScalableQuantity<ElementCount, unsigned> &V)
307
308public:
310
311 static constexpr ElementCount getFixed(ScalarTy MinVal) {
312 return ElementCount(MinVal, false);
313 }
314 static constexpr ElementCount getScalable(ScalarTy MinVal) {
315 return ElementCount(MinVal, true);
316 }
317 static constexpr ElementCount get(ScalarTy MinVal, bool Scalable) {
318 return ElementCount(MinVal, Scalable);
319 }
320
321 /// Exactly one element.
322 constexpr bool isScalar() const {
323 return !isScalable() && getKnownMinValue() == 1;
324 }
325 /// One or more elements.
326 constexpr bool isVector() const {
327 return (isScalable() && getKnownMinValue() != 0) || getKnownMinValue() > 1;
328 }
329};
330
331// Stores the size of a type. If the type is of fixed size, it will represent
332// the exact size. If the type is a scalable vector, it will represent the known
333// minimum size.
334class TypeSize : public details::FixedOrScalableQuantity<TypeSize, uint64_t> {
335 TypeSize(const FixedOrScalableQuantity<TypeSize, uint64_t> &V)
337
338public:
341
342 static constexpr TypeSize get(ScalarTy Quantity, bool Scalable) {
343 return TypeSize(Quantity, Scalable);
344 }
345 static constexpr TypeSize getFixed(ScalarTy ExactSize) {
346 return TypeSize(ExactSize, false);
347 }
348 static constexpr TypeSize getScalable(ScalarTy MinimumSize) {
349 return TypeSize(MinimumSize, true);
350 }
351 static constexpr TypeSize getZero() { return TypeSize(0, false); }
352
353 // All code for this class below this point is needed because of the
354 // temporary implicit conversion to uint64_t. The operator overloads are
355 // needed because otherwise the conversion of the parent class
356 // UnivariateLinearPolyBase -> TypeSize is ambiguous.
357 // TODO: Remove the implicit conversion.
358
359 // Casts to a uint64_t if this is a fixed-width size.
360 //
361 // This interface is deprecated and will be removed in a future version
362 // of LLVM in favour of upgrading uses that rely on this implicit conversion
363 // to uint64_t. Calls to functions that return a TypeSize should use the
364 // proper interfaces to TypeSize.
365 // In practice this is mostly calls to MVT/EVT::getSizeInBits().
366 //
367 // To determine how to upgrade the code:
368 //
369 // if (<algorithm works for both scalable and fixed-width vectors>)
370 // use getKnownMinValue()
371 // else if (<algorithm works only for fixed-width vectors>) {
372 // if <algorithm can be adapted for both scalable and fixed-width vectors>
373 // update the algorithm and use getKnownMinValue()
374 // else
375 // bail out early for scalable vectors and use getFixedValue()
376 // }
377 operator ScalarTy() const;
378
379 // Additional operators needed to avoid ambiguous parses
380 // because of the implicit conversion hack.
381 friend constexpr TypeSize operator*(const TypeSize &LHS, const int RHS) {
382 return LHS * (ScalarTy)RHS;
383 }
384 friend constexpr TypeSize operator*(const TypeSize &LHS, const unsigned RHS) {
385 return LHS * (ScalarTy)RHS;
386 }
387 friend constexpr TypeSize operator*(const TypeSize &LHS, const int64_t RHS) {
388 return LHS * (ScalarTy)RHS;
389 }
390 friend constexpr TypeSize operator*(const int LHS, const TypeSize &RHS) {
391 return RHS * LHS;
392 }
393 friend constexpr TypeSize operator*(const unsigned LHS, const TypeSize &RHS) {
394 return RHS * LHS;
395 }
396 friend constexpr TypeSize operator*(const int64_t LHS, const TypeSize &RHS) {
397 return RHS * LHS;
398 }
399 friend constexpr TypeSize operator*(const uint64_t LHS, const TypeSize &RHS) {
400 return RHS * LHS;
401 }
402};
403
404//===----------------------------------------------------------------------===//
405// Utilities
406//===----------------------------------------------------------------------===//
407
408/// Returns a TypeSize with a known minimum size that is the next integer
409/// (mod 2**64) that is greater than or equal to \p Quantity and is a multiple
410/// of \p Align. \p Align must be non-zero.
411///
412/// Similar to the alignTo functions in MathExtras.h
414 assert(Align != 0u && "Align must be non-zero");
415 return {(Size.getKnownMinValue() + Align - 1) / Align * Align,
416 Size.isScalable()};
417}
418
419/// Stream operator function for `FixedOrScalableQuantity`.
420template <typename LeafTy, typename ScalarTy>
424 PS.print(OS);
425 return OS;
426}
427
428template <> struct DenseMapInfo<ElementCount, void> {
429 static inline ElementCount getEmptyKey() {
430 return ElementCount::getScalable(~0U);
431 }
433 return ElementCount::getFixed(~0U - 1);
434 }
435 static unsigned getHashValue(const ElementCount &EltCnt) {
436 unsigned HashVal = EltCnt.getKnownMinValue() * 37U;
437 if (EltCnt.isScalable())
438 return (HashVal - 1U);
439
440 return HashVal;
441 }
442 static bool isEqual(const ElementCount &LHS, const ElementCount &RHS) {
443 return LHS == RHS;
444 }
445};
446
447} // end namespace llvm
448
449#endif // LLVM_SUPPORT_TYPESIZE_H
uint64_t Size
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
raw_pwrite_stream & OS
Value * RHS
Value * LHS
constexpr bool isVector() const
One or more elements.
Definition: TypeSize.h:326
constexpr ElementCount()
Definition: TypeSize.h:309
static constexpr ElementCount getScalable(ScalarTy MinVal)
Definition: TypeSize.h:314
static constexpr ElementCount getFixed(ScalarTy MinVal)
Definition: TypeSize.h:311
static constexpr ElementCount get(ScalarTy MinVal, bool Scalable)
Definition: TypeSize.h:317
constexpr bool isScalar() const
Exactly one element.
Definition: TypeSize.h:322
StackOffset holds a fixed and a scalable offset in bytes.
Definition: TypeSize.h:33
int64_t getFixed() const
Returns the fixed component of the stack.
Definition: TypeSize.h:49
StackOffset operator+(const StackOffset &RHS) const
Definition: TypeSize.h:55
int64_t getScalable() const
Returns the scalable component of the stack.
Definition: TypeSize.h:52
StackOffset operator-() const
Definition: TypeSize.h:71
bool operator!=(const StackOffset &RHS) const
Definition: TypeSize.h:77
StackOffset operator-(const StackOffset &RHS) const
Definition: TypeSize.h:58
bool operator==(const StackOffset &RHS) const
Definition: TypeSize.h:74
StackOffset & operator-=(const StackOffset &RHS)
Definition: TypeSize.h:66
static StackOffset get(int64_t Fixed, int64_t Scalable)
Definition: TypeSize.h:44
StackOffset()=default
static StackOffset getScalable(int64_t Scalable)
Definition: TypeSize.h:43
static StackOffset getFixed(int64_t Fixed)
Definition: TypeSize.h:42
StackOffset & operator+=(const StackOffset &RHS)
Definition: TypeSize.h:61
static constexpr TypeSize getFixed(ScalarTy ExactSize)
Definition: TypeSize.h:345
constexpr TypeSize(ScalarTy Quantity, bool Scalable)
Definition: TypeSize.h:339
static constexpr TypeSize getZero()
Definition: TypeSize.h:351
friend constexpr TypeSize operator*(const TypeSize &LHS, const unsigned RHS)
Definition: TypeSize.h:384
friend constexpr TypeSize operator*(const TypeSize &LHS, const int64_t RHS)
Definition: TypeSize.h:387
friend constexpr TypeSize operator*(const uint64_t LHS, const TypeSize &RHS)
Definition: TypeSize.h:399
static constexpr TypeSize getScalable(ScalarTy MinimumSize)
Definition: TypeSize.h:348
static constexpr TypeSize get(ScalarTy Quantity, bool Scalable)
Definition: TypeSize.h:342
friend constexpr TypeSize operator*(const TypeSize &LHS, const int RHS)
Definition: TypeSize.h:381
friend constexpr TypeSize operator*(const int64_t LHS, const TypeSize &RHS)
Definition: TypeSize.h:396
friend constexpr TypeSize operator*(const unsigned LHS, const TypeSize &RHS)
Definition: TypeSize.h:393
friend constexpr TypeSize operator*(const int LHS, const TypeSize &RHS)
Definition: TypeSize.h:390
constexpr bool isKnownMultipleOf(ScalarTy RHS) const
This function tells the caller whether the element count is known at compile time to be a multiple of...
Definition: TypeSize.h:183
constexpr bool hasKnownScalarFactor(const FixedOrScalableQuantity &RHS) const
Returns true if there exists a value X where RHS.multiplyCoefficientBy(X) will result in a value whos...
Definition: TypeSize.h:271
friend constexpr LeafTy & operator*=(LeafTy &LHS, ScalarTy RHS)
Definition: TypeSize.h:120
friend constexpr LeafTy operator+(const LeafTy &LHS, const LeafTy &RHS)
Definition: TypeSize.h:125
constexpr bool operator!=(const FixedOrScalableQuantity &RHS) const
Definition: TypeSize.h:152
friend constexpr LeafTy & operator-=(LeafTy &LHS, const LeafTy &RHS)
Definition: TypeSize.h:110
constexpr ScalarTy getFixedValue() const
Definition: TypeSize.h:202
static constexpr bool isKnownLE(const FixedOrScalableQuantity &LHS, const FixedOrScalableQuantity &RHS)
Definition: TypeSize.h:232
constexpr FixedOrScalableQuantity()=default
friend constexpr LeafTy & operator+=(LeafTy &LHS, const LeafTy &RHS)
Definition: TypeSize.h:100
constexpr bool isNonZero() const
Definition: TypeSize.h:158
friend constexpr std::enable_if_t< std::is_signed_v< U >, LeafTy > operator-(const LeafTy &LHS)
Definition: TypeSize.h:142
void print(raw_ostream &OS) const
Printing function.
Definition: TypeSize.h:285
constexpr LeafTy coefficientNextPowerOf2() const
Definition: TypeSize.h:262
constexpr LeafTy getWithIncrement(ScalarTy RHS) const
Add RHS to the underlying quantity.
Definition: TypeSize.h:163
constexpr ScalarTy getKnownScalarFactor(const FixedOrScalableQuantity &RHS) const
Returns a value X where RHS.multiplyCoefficientBy(X) will result in a value whose quantity matches ou...
Definition: TypeSize.h:279
constexpr FixedOrScalableQuantity(ScalarTy Quantity, bool Scalable)
Definition: TypeSize.h:97
static constexpr bool isKnownLT(const FixedOrScalableQuantity &LHS, const FixedOrScalableQuantity &RHS)
Definition: TypeSize.h:218
friend constexpr LeafTy operator-(const LeafTy &LHS, const LeafTy &RHS)
Definition: TypeSize.h:130
constexpr bool isScalable() const
Returns whether the quantity is scaled by a runtime quantity (vscale).
Definition: TypeSize.h:171
constexpr LeafTy multiplyCoefficientBy(ScalarTy RHS) const
Definition: TypeSize.h:258
constexpr bool isKnownEven() const
A return value of true indicates we know at compile time that the number of elements (vscale * Min) i...
Definition: TypeSize.h:179
constexpr bool isFixed() const
Returns true if the quantity is not scaled by vscale.
Definition: TypeSize.h:174
friend constexpr LeafTy operator*(const LeafTy &LHS, ScalarTy RHS)
Definition: TypeSize.h:135
constexpr bool operator==(const FixedOrScalableQuantity &RHS) const
Definition: TypeSize.h:148
constexpr ScalarTy getKnownMinValue() const
Returns the minimum value this quantity can represent.
Definition: TypeSize.h:168
constexpr bool isKnownMultipleOf(const FixedOrScalableQuantity &RHS) const
Returns whether or not the callee is known to be a multiple of RHS.
Definition: TypeSize.h:188
constexpr bool isZero() const
Definition: TypeSize.h:156
static constexpr bool isKnownGT(const FixedOrScalableQuantity &LHS, const FixedOrScalableQuantity &RHS)
Definition: TypeSize.h:225
constexpr LeafTy divideCoefficientBy(ScalarTy RHS) const
We do not provide the '/' operator here because division for polynomial types does not work in the sa...
Definition: TypeSize.h:254
static constexpr bool isKnownGE(const FixedOrScalableQuantity &LHS, const FixedOrScalableQuantity &RHS)
Definition: TypeSize.h:239
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
void reportInvalidSizeRequest(const char *Msg)
Reports a diagnostic message to indicate an invalid size request has been done on a scalable vector.
Definition: TypeSize.cpp:39
uint64_t alignTo(uint64_t Size, Align A)
Returns a multiple of A needed to store Size bytes.
Definition: Alignment.h:155
raw_ostream & operator<<(raw_ostream &OS, const APFixedPoint &FX)
Definition: APFixedPoint.h:293
constexpr uint64_t NextPowerOf2(uint64_t A)
Returns the next power of two (in 64-bits) that is strictly greater than A.
Definition: MathExtras.h:382
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition: Alignment.h:39
static ElementCount getEmptyKey()
Definition: TypeSize.h:429
static unsigned getHashValue(const ElementCount &EltCnt)
Definition: TypeSize.h:435
static bool isEqual(const ElementCount &LHS, const ElementCount &RHS)
Definition: TypeSize.h:442
static ElementCount getTombstoneKey()
Definition: TypeSize.h:432
An information struct used to provide DenseMap with the various necessary components for a given valu...
Definition: DenseMapInfo.h:52