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 10 matching lines...) Expand all Loading... | |
21 namespace Ice { | 21 namespace Ice { |
22 | 22 |
23 enum Type { | 23 enum Type { |
24 #define X(tag, size, align, elts, elty, str) tag, | 24 #define X(tag, size, align, elts, elty, str) tag, |
25 ICETYPE_TABLE | 25 ICETYPE_TABLE |
26 #undef X | 26 #undef X |
27 IceType_NUM | 27 IceType_NUM |
28 }; | 28 }; |
29 | 29 |
30 enum TargetArch { | 30 enum TargetArch { |
31 Target_X8632, | 31 #define X(tag, str) tag, |
32 Target_X8664, | 32 TARGETARCH_TABLE |
33 Target_ARM32, | 33 #undef X |
34 Target_ARM64 | 34 TargetArch_NUM |
35 }; | 35 }; |
36 | 36 |
37 const char *targetArchString(const TargetArch Arch); | |
38 | |
Jim Stichnoth
2014/10/22 18:09:21
I don't think either "const" in "const TargetArch"
Karl
2014/10/27 21:24:22
Done.
| |
39 inline Ostream &operator<<(Ostream &Stream, const TargetArch Arch) { | |
40 return Stream << targetArchString(Arch); | |
41 } | |
42 | |
37 enum OptLevel { | 43 enum OptLevel { |
38 Opt_m1, | 44 Opt_m1, |
39 Opt_0, | 45 Opt_0, |
40 Opt_1, | 46 Opt_1, |
41 Opt_2 | 47 Opt_2 |
42 }; | 48 }; |
43 | 49 |
44 size_t typeWidthInBytes(Type Ty); | 50 size_t typeWidthInBytes(Type Ty); |
45 size_t typeAlignInBytes(Type Ty); | 51 size_t typeAlignInBytes(Type Ty); |
46 size_t typeNumElements(Type Ty); | 52 size_t typeNumElements(Type Ty); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
136 }; | 142 }; |
137 | 143 |
138 inline Ostream &operator<<(Ostream &Stream, const FuncSigType &Sig) { | 144 inline Ostream &operator<<(Ostream &Stream, const FuncSigType &Sig) { |
139 Sig.dump(Stream); | 145 Sig.dump(Stream); |
140 return Stream; | 146 return Stream; |
141 } | 147 } |
142 | 148 |
143 } // end of namespace Ice | 149 } // end of namespace Ice |
144 | 150 |
145 #endif // SUBZERO_SRC_ICETYPES_H | 151 #endif // SUBZERO_SRC_ICETYPES_H |
OLD | NEW |