Add some comments explaining what MVT and EVT are, and how they differ.
[oota-llvm.git] / include / llvm / CodeGen / ValueTypes.h
1 //===- CodeGen/ValueTypes.h - Low-Level Target independ. types --*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines the set of low-level target independent types which various
11 // values in the code generator are.  This allows the target specific behavior
12 // of instructions to be described to target independent passes.
13 //
14 //===----------------------------------------------------------------------===//
15
16 #ifndef LLVM_CODEGEN_VALUETYPES_H
17 #define LLVM_CODEGEN_VALUETYPES_H
18
19 #include <cassert>
20 #include <string>
21 #include "llvm/System/DataTypes.h"
22 #include "llvm/Support/MathExtras.h"
23
24 namespace llvm {
25   class Type;
26   class LLVMContext;
27   struct EVT;
28
29   /// MVT - Machine Value Type.  Every type that is supported natively by some
30   /// processor targeted by LLVM occurs here.  This means that any legal value
31   /// type can be represented by a MVT.
32   class MVT {
33   public:
34     enum SimpleValueType {
35       // If you change this numbering, you must change the values in
36       // ValueTypes.td as well!
37       Other          =   0,   // This is a non-standard value
38       i1             =   1,   // This is a 1 bit integer value
39       i8             =   2,   // This is an 8 bit integer value
40       i16            =   3,   // This is a 16 bit integer value
41       i32            =   4,   // This is a 32 bit integer value
42       i64            =   5,   // This is a 64 bit integer value
43       i128           =   6,   // This is a 128 bit integer value
44
45       FIRST_INTEGER_VALUETYPE = i1,
46       LAST_INTEGER_VALUETYPE  = i128,
47
48       f32            =   7,   // This is a 32 bit floating point value
49       f64            =   8,   // This is a 64 bit floating point value
50       f80            =   9,   // This is a 80 bit floating point value
51       f128           =  10,   // This is a 128 bit floating point value
52       ppcf128        =  11,   // This is a PPC 128-bit floating point value
53
54       v2i8           =  12,   //  2 x i8
55       v4i8           =  13,   //  4 x i8
56       v8i8           =  14,   //  8 x i8
57       v16i8          =  15,   // 16 x i8
58       v32i8          =  16,   // 32 x i8
59       v2i16          =  17,   //  2 x i16
60       v4i16          =  18,   //  4 x i16
61       v8i16          =  19,   //  8 x i16
62       v16i16         =  20,   // 16 x i16
63       v2i32          =  21,   //  2 x i32
64       v4i32          =  22,   //  4 x i32
65       v8i32          =  23,   //  8 x i32
66       v1i64          =  24,   //  1 x i64
67       v2i64          =  25,   //  2 x i64
68       v4i64          =  26,   //  4 x i64
69       v8i64          =  27,   //  8 x i64
70
71       v2f32          =  28,   //  2 x f32
72       v4f32          =  29,   //  4 x f32
73       v8f32          =  30,   //  8 x f32
74       v2f64          =  31,   //  2 x f64
75       v4f64          =  32,   //  4 x f64
76
77       FIRST_VECTOR_VALUETYPE = v2i8,
78       LAST_VECTOR_VALUETYPE  = v4f64,
79
80       x86mmx         =  33,   // This is an X86 MMX value
81
82       Flag           =  34,   // This glues nodes together during pre-RA sched
83
84       isVoid         =  35,   // This has no value
85
86       LAST_VALUETYPE =  36,   // This always remains at the end of the list.
87
88       // This is the current maximum for LAST_VALUETYPE.
89       // EVT::MAX_ALLOWED_VALUETYPE is used for asserts and to size bit vectors
90       // This value must be a multiple of 32.
91       MAX_ALLOWED_VALUETYPE = 64,
92
93       // Metadata - This is MDNode or MDString.
94       Metadata       = 250,
95
96       // iPTRAny - An int value the size of the pointer of the current
97       // target to any address space. This must only be used internal to
98       // tblgen. Other than for overloading, we treat iPTRAny the same as iPTR.
99       iPTRAny        = 251,
100
101       // vAny - A vector with any length and element size. This is used
102       // for intrinsics that have overloadings based on vector types.
103       // This is only for tblgen's consumption!
104       vAny           = 252,
105
106       // fAny - Any floating-point or vector floating-point value. This is used
107       // for intrinsics that have overloadings based on floating-point types.
108       // This is only for tblgen's consumption!
109       fAny           = 253,
110
111       // iAny - An integer or vector integer value of any bit width. This is
112       // used for intrinsics that have overloadings based on integer bit widths.
113       // This is only for tblgen's consumption!
114       iAny           = 254,
115
116       // iPTR - An int value the size of the pointer of the current
117       // target.  This should only be used internal to tblgen!
118       iPTR           = 255,
119
120       // LastSimpleValueType - The greatest valid SimpleValueType value.
121       LastSimpleValueType = 255,
122
123       // INVALID_SIMPLE_VALUE_TYPE - Simple value types greater than or equal
124       // to this are considered extended value types.
125       INVALID_SIMPLE_VALUE_TYPE = LastSimpleValueType + 1
126     };
127
128     SimpleValueType SimpleTy;
129
130     MVT() : SimpleTy((SimpleValueType)(INVALID_SIMPLE_VALUE_TYPE)) {}
131     MVT(SimpleValueType SVT) : SimpleTy(SVT) { }
132
133     bool operator>(const MVT& S)  const { return SimpleTy >  S.SimpleTy; }
134     bool operator<(const MVT& S)  const { return SimpleTy <  S.SimpleTy; }
135     bool operator==(const MVT& S) const { return SimpleTy == S.SimpleTy; }
136     bool operator>=(const MVT& S) const { return SimpleTy >= S.SimpleTy; }
137     bool operator<=(const MVT& S) const { return SimpleTy <= S.SimpleTy; }
138
139     /// isFloatingPoint - Return true if this is a FP, or a vector FP type.
140     bool isFloatingPoint() const {
141       return ((SimpleTy >= MVT::f32 && SimpleTy <= MVT::ppcf128) ||
142         (SimpleTy >= MVT::v2f32 && SimpleTy <= MVT::v4f64));
143     }
144
145     /// isInteger - Return true if this is an integer, or a vector integer type.
146     bool isInteger() const {
147       return ((SimpleTy >= MVT::FIRST_INTEGER_VALUETYPE &&
148                SimpleTy <= MVT::LAST_INTEGER_VALUETYPE) ||
149                (SimpleTy >= MVT::v2i8 && SimpleTy <= MVT::v8i64));
150     }
151
152     /// isVector - Return true if this is a vector value type.
153     bool isVector() const {
154       return (SimpleTy >= MVT::FIRST_VECTOR_VALUETYPE &&
155               SimpleTy <= MVT::LAST_VECTOR_VALUETYPE);
156     }
157
158     /// isPow2VectorType - Returns true if the given vector is a power of 2.
159     bool isPow2VectorType() const {
160       unsigned NElts = getVectorNumElements();
161       return !(NElts & (NElts - 1));
162     }
163
164     /// getPow2VectorType - Widens the length of the given vector MVT up to
165     /// the nearest power of 2 and returns that type.
166     MVT getPow2VectorType() const {
167       if (isPow2VectorType())
168         return *this;
169
170       unsigned NElts = getVectorNumElements();
171       unsigned Pow2NElts = 1 << Log2_32_Ceil(NElts);
172       return MVT::getVectorVT(getVectorElementType(), Pow2NElts);
173     }
174
175     /// getScalarType - If this is a vector type, return the element type,
176     /// otherwise return this.
177     MVT getScalarType() const {
178       return isVector() ? getVectorElementType() : *this;
179     }
180
181     MVT getVectorElementType() const {
182       switch (SimpleTy) {
183       default:
184         return (MVT::SimpleValueType)(MVT::INVALID_SIMPLE_VALUE_TYPE);
185       case v2i8 :
186       case v4i8 :
187       case v8i8 :
188       case v16i8:
189       case v32i8: return i8;
190       case v2i16:
191       case v4i16:
192       case v8i16:
193       case v16i16: return i16;
194       case v2i32:
195       case v4i32:
196       case v8i32: return i32;
197       case v1i64:
198       case v2i64:
199       case v4i64:
200       case v8i64: return i64;
201       case v2f32:
202       case v4f32:
203       case v8f32: return f32;
204       case v2f64:
205       case v4f64: return f64;
206       }
207     }
208
209     unsigned getVectorNumElements() const {
210       switch (SimpleTy) {
211       default:
212         return ~0U;
213       case v32i8: return 32;
214       case v16i8:
215       case v16i16: return 16;
216       case v8i8 :
217       case v8i16:
218       case v8i32:
219       case v8i64:
220       case v8f32: return 8;
221       case v4i8:
222       case v4i16:
223       case v4i32:
224       case v4i64:
225       case v4f32:
226       case v4f64: return 4;
227       case v2i8:
228       case v2i16:
229       case v2i32:
230       case v2i64:
231       case v2f32:
232       case v2f64: return 2;
233       case v1i64: return 1;
234       }
235     }
236
237     unsigned getSizeInBits() const {
238       switch (SimpleTy) {
239       case iPTR:
240         assert(0 && "Value type size is target-dependent. Ask TLI.");
241       case iPTRAny:
242       case iAny:
243       case fAny:
244         assert(0 && "Value type is overloaded.");
245       default:
246         assert(0 && "getSizeInBits called on extended MVT.");
247       case i1  :  return 1;
248       case i8  :  return 8;
249       case i16 :
250       case v2i8:  return 16;
251       case f32 :
252       case i32 :
253       case v4i8:
254       case v2i16: return 32;
255       case x86mmx:
256       case f64 :
257       case i64 :
258       case v8i8:
259       case v4i16:
260       case v2i32:
261       case v1i64:
262       case v2f32: return 64;
263       case f80 :  return 80;
264       case f128:
265       case ppcf128:
266       case i128:
267       case v16i8:
268       case v8i16:
269       case v4i32:
270       case v2i64:
271       case v4f32:
272       case v2f64: return 128;
273       case v32i8:
274       case v16i16:
275       case v8i32:
276       case v4i64:
277       case v8f32:
278       case v4f64: return 256;
279       case v8i64: return 512;
280       }
281     }
282
283     static MVT getFloatingPointVT(unsigned BitWidth) {
284       switch (BitWidth) {
285       default:
286         assert(false && "Bad bit width!");
287       case 32:
288         return MVT::f32;
289       case 64:
290         return MVT::f64;
291       case 80:
292         return MVT::f80;
293       case 128:
294         return MVT::f128;
295       }
296     }
297
298     static MVT getIntegerVT(unsigned BitWidth) {
299       switch (BitWidth) {
300       default:
301         return (MVT::SimpleValueType)(MVT::INVALID_SIMPLE_VALUE_TYPE);
302       case 1:
303         return MVT::i1;
304       case 8:
305         return MVT::i8;
306       case 16:
307         return MVT::i16;
308       case 32:
309         return MVT::i32;
310       case 64:
311         return MVT::i64;
312       case 128:
313         return MVT::i128;
314       }
315     }
316
317     static MVT getVectorVT(MVT VT, unsigned NumElements) {
318       switch (VT.SimpleTy) {
319       default:
320         break;
321       case MVT::i8:
322         if (NumElements == 2)  return MVT::v2i8;
323         if (NumElements == 4)  return MVT::v4i8;
324         if (NumElements == 8)  return MVT::v8i8;
325         if (NumElements == 16) return MVT::v16i8;
326         if (NumElements == 32) return MVT::v32i8;
327         break;
328       case MVT::i16:
329         if (NumElements == 2)  return MVT::v2i16;
330         if (NumElements == 4)  return MVT::v4i16;
331         if (NumElements == 8)  return MVT::v8i16;
332         if (NumElements == 16) return MVT::v16i16;
333         break;
334       case MVT::i32:
335         if (NumElements == 2)  return MVT::v2i32;
336         if (NumElements == 4)  return MVT::v4i32;
337         if (NumElements == 8)  return MVT::v8i32;
338         break;
339       case MVT::i64:
340         if (NumElements == 1)  return MVT::v1i64;
341         if (NumElements == 2)  return MVT::v2i64;
342         if (NumElements == 4)  return MVT::v4i64;
343         if (NumElements == 8)  return MVT::v8i64;
344         break;
345       case MVT::f32:
346         if (NumElements == 2)  return MVT::v2f32;
347         if (NumElements == 4)  return MVT::v4f32;
348         if (NumElements == 8)  return MVT::v8f32;
349         break;
350       case MVT::f64:
351         if (NumElements == 2)  return MVT::v2f64;
352         if (NumElements == 4)  return MVT::v4f64;
353         break;
354       }
355       return (MVT::SimpleValueType)(MVT::INVALID_SIMPLE_VALUE_TYPE);
356     }
357   };
358
359
360   /// EVT - Extended Value Type.  Capable of holding value types which are not
361   /// native for any processor (such as the i12345 type), as well as the types
362   /// a MVT can represent.
363   struct EVT {
364   private:
365     MVT V;
366     const Type *LLVMTy;
367
368   public:
369     EVT() : V((MVT::SimpleValueType)(MVT::INVALID_SIMPLE_VALUE_TYPE)),
370             LLVMTy(0) {}
371     EVT(MVT::SimpleValueType SVT) : V(SVT), LLVMTy(0) { }
372     EVT(MVT S) : V(S), LLVMTy(0) {}
373
374     bool operator==(EVT VT) const {
375       return !(*this != VT);
376     }
377     bool operator!=(EVT VT) const {
378       if (V.SimpleTy != VT.V.SimpleTy)
379         return true;
380       if (V.SimpleTy == MVT::INVALID_SIMPLE_VALUE_TYPE)
381         return LLVMTy != VT.LLVMTy;
382       return false;
383     }
384
385     /// getFloatingPointVT - Returns the EVT that represents a floating point
386     /// type with the given number of bits.  There are two floating point types
387     /// with 128 bits - this returns f128 rather than ppcf128.
388     static EVT getFloatingPointVT(unsigned BitWidth) {
389       return MVT::getFloatingPointVT(BitWidth);
390     }
391
392     /// getIntegerVT - Returns the EVT that represents an integer with the given
393     /// number of bits.
394     static EVT getIntegerVT(LLVMContext &Context, unsigned BitWidth) {
395       MVT M = MVT::getIntegerVT(BitWidth);
396       if (M.SimpleTy != MVT::INVALID_SIMPLE_VALUE_TYPE)
397         return M;
398       return getExtendedIntegerVT(Context, BitWidth);
399     }
400
401     /// getVectorVT - Returns the EVT that represents a vector NumElements in
402     /// length, where each element is of type VT.
403     static EVT getVectorVT(LLVMContext &Context, EVT VT, unsigned NumElements) {
404       MVT M = MVT::getVectorVT(VT.V, NumElements);
405       if (M.SimpleTy != MVT::INVALID_SIMPLE_VALUE_TYPE)
406         return M;
407       return getExtendedVectorVT(Context, VT, NumElements);
408     }
409
410     /// getIntVectorWithNumElements - Return any integer vector type that has
411     /// the specified number of elements.
412     static EVT getIntVectorWithNumElements(LLVMContext &C, unsigned NumElts) {
413       switch (NumElts) {
414       default: return getVectorVT(C, MVT::i8, NumElts);
415       case  1: return MVT::v1i64;
416       case  2: return MVT::v2i32;
417       case  4: return MVT::v4i16;
418       case  8: return MVT::v8i8;
419       case 16: return MVT::v16i8;
420       }
421       return MVT::INVALID_SIMPLE_VALUE_TYPE;
422     }
423
424     /// isSimple - Test if the given EVT is simple (as opposed to being
425     /// extended).
426     bool isSimple() const {
427       return V.SimpleTy <= MVT::LastSimpleValueType;
428     }
429
430     /// isExtended - Test if the given EVT is extended (as opposed to
431     /// being simple).
432     bool isExtended() const {
433       return !isSimple();
434     }
435
436     /// isFloatingPoint - Return true if this is a FP, or a vector FP type.
437     bool isFloatingPoint() const {
438       return isSimple() ? V.isFloatingPoint() : isExtendedFloatingPoint();
439     }
440
441     /// isInteger - Return true if this is an integer, or a vector integer type.
442     bool isInteger() const {
443       return isSimple() ? V.isInteger() : isExtendedInteger();
444     }
445
446     /// isVector - Return true if this is a vector value type.
447     bool isVector() const {
448       return isSimple() ? V.isVector() : isExtendedVector();
449     }
450
451     /// is64BitVector - Return true if this is a 64-bit vector type.
452     bool is64BitVector() const {
453       if (!isSimple())
454         return isExtended64BitVector();
455
456       return (V == MVT::v8i8  || V==MVT::v4i16 || V==MVT::v2i32 ||
457               V == MVT::v1i64 || V==MVT::v2f32);
458     }
459
460     /// is128BitVector - Return true if this is a 128-bit vector type.
461     bool is128BitVector() const {
462       if (!isSimple())
463         return isExtended128BitVector();
464       return (V==MVT::v16i8 || V==MVT::v8i16 || V==MVT::v4i32 ||
465               V==MVT::v2i64 || V==MVT::v4f32 || V==MVT::v2f64);
466     }
467
468     /// is256BitVector - Return true if this is a 256-bit vector type.
469     inline bool is256BitVector() const {
470       if (!isSimple())
471         return isExtended256BitVector();
472       return (V == MVT::v8f32  || V == MVT::v4f64 || V == MVT::v32i8 ||
473               V == MVT::v16i16 || V == MVT::v8i32 || V == MVT::v4i64);
474     }
475
476     /// is512BitVector - Return true if this is a 512-bit vector type.
477     inline bool is512BitVector() const {
478       return isSimple() ? (V == MVT::v8i64) : isExtended512BitVector();
479     }
480
481     /// isOverloaded - Return true if this is an overloaded type for TableGen.
482     bool isOverloaded() const {
483       return (V==MVT::iAny || V==MVT::fAny || V==MVT::vAny || V==MVT::iPTRAny);
484     }
485
486     /// isByteSized - Return true if the bit size is a multiple of 8.
487     bool isByteSized() const {
488       return (getSizeInBits() & 7) == 0;
489     }
490
491     /// isRound - Return true if the size is a power-of-two number of bytes.
492     bool isRound() const {
493       unsigned BitSize = getSizeInBits();
494       return BitSize >= 8 && !(BitSize & (BitSize - 1));
495     }
496
497     /// bitsEq - Return true if this has the same number of bits as VT.
498     bool bitsEq(EVT VT) const {
499       if (EVT::operator==(VT)) return true;
500       return getSizeInBits() == VT.getSizeInBits();
501     }
502
503     /// bitsGT - Return true if this has more bits than VT.
504     bool bitsGT(EVT VT) const {
505       if (EVT::operator==(VT)) return false;
506       return getSizeInBits() > VT.getSizeInBits();
507     }
508
509     /// bitsGE - Return true if this has no less bits than VT.
510     bool bitsGE(EVT VT) const {
511       if (EVT::operator==(VT)) return true;
512       return getSizeInBits() >= VT.getSizeInBits();
513     }
514
515     /// bitsLT - Return true if this has less bits than VT.
516     bool bitsLT(EVT VT) const {
517       if (EVT::operator==(VT)) return false;
518       return getSizeInBits() < VT.getSizeInBits();
519     }
520
521     /// bitsLE - Return true if this has no more bits than VT.
522     bool bitsLE(EVT VT) const {
523       if (EVT::operator==(VT)) return true;
524       return getSizeInBits() <= VT.getSizeInBits();
525     }
526
527
528     /// getSimpleVT - Return the SimpleValueType held in the specified
529     /// simple EVT.
530     MVT getSimpleVT() const {
531       assert(isSimple() && "Expected a SimpleValueType!");
532       return V;
533     }
534
535     /// getScalarType - If this is a vector type, return the element type,
536     /// otherwise return this.
537     EVT getScalarType() const {
538       return isVector() ? getVectorElementType() : *this;
539     }
540
541     /// getVectorElementType - Given a vector type, return the type of
542     /// each element.
543     EVT getVectorElementType() const {
544       assert(isVector() && "Invalid vector type!");
545       if (isSimple())
546         return V.getVectorElementType();
547       return getExtendedVectorElementType();
548     }
549
550     /// getVectorNumElements - Given a vector type, return the number of
551     /// elements it contains.
552     unsigned getVectorNumElements() const {
553       assert(isVector() && "Invalid vector type!");
554       if (isSimple())
555         return V.getVectorNumElements();
556       return getExtendedVectorNumElements();
557     }
558
559     /// getSizeInBits - Return the size of the specified value type in bits.
560     unsigned getSizeInBits() const {
561       if (isSimple())
562         return V.getSizeInBits();
563       return getExtendedSizeInBits();
564     }
565
566     /// getStoreSize - Return the number of bytes overwritten by a store
567     /// of the specified value type.
568     unsigned getStoreSize() const {
569       return (getSizeInBits() + 7) / 8;
570     }
571
572     /// getStoreSizeInBits - Return the number of bits overwritten by a store
573     /// of the specified value type.
574     unsigned getStoreSizeInBits() const {
575       return getStoreSize() * 8;
576     }
577
578     /// getRoundIntegerType - Rounds the bit-width of the given integer EVT up
579     /// to the nearest power of two (and at least to eight), and returns the
580     /// integer EVT with that number of bits.
581     EVT getRoundIntegerType(LLVMContext &Context) const {
582       assert(isInteger() && !isVector() && "Invalid integer type!");
583       unsigned BitWidth = getSizeInBits();
584       if (BitWidth <= 8)
585         return EVT(MVT::i8);
586       return getIntegerVT(Context, 1 << Log2_32_Ceil(BitWidth));
587     }
588
589     /// getHalfSizedIntegerVT - Finds the smallest simple value type that is
590     /// greater than or equal to half the width of this EVT. If no simple
591     /// value type can be found, an extended integer value type of half the
592     /// size (rounded up) is returned.
593     EVT getHalfSizedIntegerVT(LLVMContext &Context) const {
594       assert(isInteger() && !isVector() && "Invalid integer type!");
595       unsigned EVTSize = getSizeInBits();
596       for (unsigned IntVT = MVT::FIRST_INTEGER_VALUETYPE;
597           IntVT <= MVT::LAST_INTEGER_VALUETYPE; ++IntVT) {
598         EVT HalfVT = EVT((MVT::SimpleValueType)IntVT);
599         if (HalfVT.getSizeInBits() * 2 >= EVTSize)
600           return HalfVT;
601       }
602       return getIntegerVT(Context, (EVTSize + 1) / 2);
603     }
604
605     /// isPow2VectorType - Returns true if the given vector is a power of 2.
606     bool isPow2VectorType() const {
607       unsigned NElts = getVectorNumElements();
608       return !(NElts & (NElts - 1));
609     }
610
611     /// getPow2VectorType - Widens the length of the given vector EVT up to
612     /// the nearest power of 2 and returns that type.
613     EVT getPow2VectorType(LLVMContext &Context) const {
614       if (!isPow2VectorType()) {
615         unsigned NElts = getVectorNumElements();
616         unsigned Pow2NElts = 1 <<  Log2_32_Ceil(NElts);
617         return EVT::getVectorVT(Context, getVectorElementType(), Pow2NElts);
618       }
619       else {
620         return *this;
621       }
622     }
623
624     /// getEVTString - This function returns value type as a string,
625     /// e.g. "i32".
626     std::string getEVTString() const;
627
628     /// getTypeForEVT - This method returns an LLVM type corresponding to the
629     /// specified EVT.  For integer types, this returns an unsigned type.  Note
630     /// that this will abort for types that cannot be represented.
631     const Type *getTypeForEVT(LLVMContext &Context) const;
632
633     /// getEVT - Return the value type corresponding to the specified type.
634     /// This returns all pointers as iPTR.  If HandleUnknown is true, unknown
635     /// types are returned as Other, otherwise they are invalid.
636     static EVT getEVT(const Type *Ty, bool HandleUnknown = false);
637
638     intptr_t getRawBits() {
639       if (isSimple())
640         return V.SimpleTy;
641       else
642         return (intptr_t)(LLVMTy);
643     }
644
645     /// compareRawBits - A meaningless but well-behaved order, useful for
646     /// constructing containers.
647     struct compareRawBits {
648       bool operator()(EVT L, EVT R) const {
649         if (L.V.SimpleTy == R.V.SimpleTy)
650           return L.LLVMTy < R.LLVMTy;
651         else
652           return L.V.SimpleTy < R.V.SimpleTy;
653       }
654     };
655
656   private:
657     // Methods for handling the Extended-type case in functions above.
658     // These are all out-of-line to prevent users of this header file
659     // from having a dependency on Type.h.
660     static EVT getExtendedIntegerVT(LLVMContext &C, unsigned BitWidth);
661     static EVT getExtendedVectorVT(LLVMContext &C, EVT VT,
662                                    unsigned NumElements);
663     bool isExtendedFloatingPoint() const;
664     bool isExtendedInteger() const;
665     bool isExtendedVector() const;
666     bool isExtended64BitVector() const;
667     bool isExtended128BitVector() const;
668     bool isExtended256BitVector() const;
669     bool isExtended512BitVector() const;
670     EVT getExtendedVectorElementType() const;
671     unsigned getExtendedVectorNumElements() const;
672     unsigned getExtendedSizeInBits() const;
673   };
674
675 } // End llvm namespace
676
677 #endif