OLD | NEW |
1 //===- subzero/src/IceTypes.h - Primitive ICE types -------------*- C++ -*-===// | 1 //===- subzero/src/IceTypes.h - Primitive ICE types -------------*- C++ -*-===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This file declares a few properties of the primitive types allowed | 10 // This file declares a few properties of the primitive types allowed |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 bool isVectorFloatingType(Type Ty); | 59 bool isVectorFloatingType(Type Ty); |
60 | 60 |
61 /// Returns true if the given type can be used in a load instruction. | 61 /// Returns true if the given type can be used in a load instruction. |
62 bool isLoadStoreType(Type Ty); | 62 bool isLoadStoreType(Type Ty); |
63 | 63 |
64 /// Returns type generated by applying the compare instructions (icmp and fcmp) | 64 /// Returns type generated by applying the compare instructions (icmp and fcmp) |
65 /// to arguments of the given type. Returns IceType_void if compare is not | 65 /// to arguments of the given type. Returns IceType_void if compare is not |
66 /// allowed. | 66 /// allowed. |
67 Type getCompareResultType(Type Ty); | 67 Type getCompareResultType(Type Ty); |
68 | 68 |
| 69 /// Returns the number of bits in a scalar integer type. |
| 70 SizeT getScalarIntBitWidth(Type Ty); |
| 71 |
69 template <typename StreamType> | 72 template <typename StreamType> |
70 inline StreamType &operator<<(StreamType &Str, const Type &Ty) { | 73 inline StreamType &operator<<(StreamType &Str, const Type &Ty) { |
71 Str << typeString(Ty); | 74 Str << typeString(Ty); |
72 return Str; | 75 return Str; |
73 } | 76 } |
74 | 77 |
75 } // end of namespace Ice | 78 } // end of namespace Ice |
76 | 79 |
77 #endif // SUBZERO_SRC_ICETYPES_H | 80 #endif // SUBZERO_SRC_ICETYPES_H |
OLD | NEW |