| 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 /// \file | 10 /// \file |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 bool isVectorIntegerType(Type Ty); | 74 bool isVectorIntegerType(Type Ty); |
| 75 bool isIntegerArithmeticType(Type Ty); | 75 bool isIntegerArithmeticType(Type Ty); |
| 76 | 76 |
| 77 bool isFloatingType(Type Ty); // scalar or vector | 77 bool isFloatingType(Type Ty); // scalar or vector |
| 78 bool isScalarFloatingType(Type Ty); | 78 bool isScalarFloatingType(Type Ty); |
| 79 bool isVectorFloatingType(Type Ty); | 79 bool isVectorFloatingType(Type Ty); |
| 80 | 80 |
| 81 /// Returns true if the given type can be used in a load instruction. | 81 /// Returns true if the given type can be used in a load instruction. |
| 82 bool isLoadStoreType(Type Ty); | 82 bool isLoadStoreType(Type Ty); |
| 83 | 83 |
| 84 /// Returns true if the given type can be used as a parameter type in a call. |
| 85 bool isCallParameterType(Type Ty); |
| 86 |
| 87 /// Returns true if the given type can be used as the return type of a call. |
| 88 inline bool isCallReturnType(Type Ty) { |
| 89 return Ty == IceType_void || isCallParameterType(Ty); |
| 90 } |
| 91 |
| 84 /// Returns type generated by applying the compare instructions (icmp and fcmp) | 92 /// Returns type generated by applying the compare instructions (icmp and fcmp) |
| 85 /// to arguments of the given type. Returns IceType_void if compare is not | 93 /// to arguments of the given type. Returns IceType_void if compare is not |
| 86 /// allowed. | 94 /// allowed. |
| 87 Type getCompareResultType(Type Ty); | 95 Type getCompareResultType(Type Ty); |
| 88 | 96 |
| 89 /// Returns the number of bits in a scalar integer type. | 97 /// Returns the number of bits in a scalar integer type. |
| 90 SizeT getScalarIntBitWidth(Type Ty); | 98 SizeT getScalarIntBitWidth(Type Ty); |
| 91 | 99 |
| 92 /// Check if a type is byte sized (slight optimization over typeWidthInBytes). | 100 /// Check if a type is byte sized (slight optimization over typeWidthInBytes). |
| 93 inline bool isByteSizedType(Type Ty) { | 101 inline bool isByteSizedType(Type Ty) { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 }; | 163 }; |
| 156 | 164 |
| 157 inline Ostream &operator<<(Ostream &Stream, const FuncSigType &Sig) { | 165 inline Ostream &operator<<(Ostream &Stream, const FuncSigType &Sig) { |
| 158 Sig.dump(Stream); | 166 Sig.dump(Stream); |
| 159 return Stream; | 167 return Stream; |
| 160 } | 168 } |
| 161 | 169 |
| 162 } // end of namespace Ice | 170 } // end of namespace Ice |
| 163 | 171 |
| 164 #endif // SUBZERO_SRC_ICETYPES_H | 172 #endif // SUBZERO_SRC_ICETYPES_H |
| OLD | NEW |