Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: src/IceTypes.h

Issue 1234803007: Introduction of improved switch lowering. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Safer check for 0 size type Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/IceTargetLoweringX86BaseImpl.h ('k') | src/IceTypes.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 /// This file declares a few properties of the primitive types allowed 11 /// This file declares a few properties of the primitive types allowed
12 /// in Subzero. Every Subzero source file is expected to include 12 /// in Subzero. Every Subzero source file is expected to include
13 /// IceTypes.h. 13 /// IceTypes.h.
14 /// 14 ///
15 //===----------------------------------------------------------------------===// 15 //===----------------------------------------------------------------------===//
16 16
17 #ifndef SUBZERO_SRC_ICETYPES_H 17 #ifndef SUBZERO_SRC_ICETYPES_H
18 #define SUBZERO_SRC_ICETYPES_H 18 #define SUBZERO_SRC_ICETYPES_H
19 19
20 #include "IceDefs.h" 20 #include "IceDefs.h"
21 #include "IceTypes.def" 21 #include "IceTypes.def"
22 22
23 namespace Ice { 23 namespace Ice {
24 24
25 enum Type { 25 enum Type {
26 #define X(tag, size, align, elts, elty, str) tag, 26 #define X(tag, sizeLog2, align, elts, elty, str) tag,
27 ICETYPE_TABLE 27 ICETYPE_TABLE
28 #undef X 28 #undef X
29 IceType_NUM 29 IceType_NUM
30 }; 30 };
31 31
32 enum TargetArch { 32 enum TargetArch {
33 #define X(tag, str, is_elf64, e_machine, e_flags) tag, 33 #define X(tag, str, is_elf64, e_machine, e_flags) tag,
34 TARGETARCH_TABLE 34 TARGETARCH_TABLE
35 #undef X 35 #undef X
36 TargetArch_NUM 36 TargetArch_NUM
(...skipping 16 matching lines...) Expand all
53 X86InstructionSet_End, 53 X86InstructionSet_End,
54 ARM32InstructionSet_Begin, 54 ARM32InstructionSet_Begin,
55 ARM32InstructionSet_Neon = ARM32InstructionSet_Begin, 55 ARM32InstructionSet_Neon = ARM32InstructionSet_Begin,
56 ARM32InstructionSet_HWDivArm, 56 ARM32InstructionSet_HWDivArm,
57 ARM32InstructionSet_End, 57 ARM32InstructionSet_End,
58 }; 58 };
59 59
60 enum OptLevel { Opt_m1, Opt_0, Opt_1, Opt_2 }; 60 enum OptLevel { Opt_m1, Opt_0, Opt_1, Opt_2 };
61 61
62 size_t typeWidthInBytes(Type Ty); 62 size_t typeWidthInBytes(Type Ty);
63 int8_t typeWidthInBytesLog2(Type Ty);
63 size_t typeAlignInBytes(Type Ty); 64 size_t typeAlignInBytes(Type Ty);
64 size_t typeNumElements(Type Ty); 65 size_t typeNumElements(Type Ty);
65 Type typeElementType(Type Ty); 66 Type typeElementType(Type Ty);
66 const char *typeString(Type Ty); 67 const char *typeString(Type Ty);
67 68
68 inline Type getPointerType() { return IceType_i32; } 69 inline Type getPointerType() { return IceType_i32; }
69 70
70 bool isVectorType(Type Ty); 71 bool isVectorType(Type Ty);
71 72
72 bool isIntegerType(Type Ty); // scalar or vector 73 bool isIntegerType(Type Ty); // scalar or vector
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 }; 156 };
156 157
157 inline Ostream &operator<<(Ostream &Stream, const FuncSigType &Sig) { 158 inline Ostream &operator<<(Ostream &Stream, const FuncSigType &Sig) {
158 Sig.dump(Stream); 159 Sig.dump(Stream);
159 return Stream; 160 return Stream;
160 } 161 }
161 162
162 } // end of namespace Ice 163 } // end of namespace Ice
163 164
164 #endif // SUBZERO_SRC_ICETYPES_H 165 #endif // SUBZERO_SRC_ICETYPES_H
OLDNEW
« no previous file with comments | « src/IceTargetLoweringX86BaseImpl.h ('k') | src/IceTypes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698