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

Side by Side Diff: src/IceDefs.h

Issue 300563003: Subzero: Initial O2 lowering (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Jan's third-round comments Created 6 years, 6 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/IceCfgNode.cpp ('k') | src/IceGlobalContext.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/IceDefs.h - Common Subzero declaraions -------*- C++ -*-===// 1 //===- subzero/src/IceDefs.h - Common Subzero declaraions -------*- 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 various useful types and classes that have 10 // This file declares various useful types and classes that have
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 namespace Ice { 44 namespace Ice {
45 45
46 class Cfg; 46 class Cfg;
47 class CfgNode; 47 class CfgNode;
48 class Constant; 48 class Constant;
49 class GlobalContext; 49 class GlobalContext;
50 class Inst; 50 class Inst;
51 class InstPhi; 51 class InstPhi;
52 class InstTarget; 52 class InstTarget;
53 class LiveRange;
54 class Liveness;
53 class Operand; 55 class Operand;
54 class TargetLowering; 56 class TargetLowering;
55 class Variable; 57 class Variable;
56 58
57 // TODO: Switch over to LLVM's ADT container classes. 59 // TODO: Switch over to LLVM's ADT container classes.
58 // http://llvm.org/docs/ProgrammersManual.html#picking-the-right-data-structure- for-a-task 60 // http://llvm.org/docs/ProgrammersManual.html#picking-the-right-data-structure- for-a-task
59 typedef std::string IceString; 61 typedef std::string IceString;
60 typedef std::list<Inst *> InstList; 62 typedef std::list<Inst *> InstList;
61 typedef std::list<InstPhi *> PhiList; 63 typedef std::list<InstPhi *> PhiList;
62 typedef std::vector<Variable *> VarList; 64 typedef std::vector<Variable *> VarList;
63 typedef std::vector<CfgNode *> NodeList; 65 typedef std::vector<CfgNode *> NodeList;
64 typedef std::vector<Constant *> ConstantList; 66 typedef std::vector<Constant *> ConstantList;
65 67
66 // SizeT is for holding small-ish limits like number of source 68 // SizeT is for holding small-ish limits like number of source
67 // operands in an instruction. It is used instead of size_t (which 69 // operands in an instruction. It is used instead of size_t (which
68 // may be 64-bits wide) when we want to save space. 70 // may be 64-bits wide) when we want to save space.
69 typedef uint32_t SizeT; 71 typedef uint32_t SizeT;
70 72
73 // InstNumberT is for holding an instruction number. Instruction
74 // numbers are used for representing Variable live ranges.
75 typedef int32_t InstNumberT;
76
77 enum LivenessMode {
78 // Basic version of live-range-end calculation. Marks the last uses
79 // of variables based on dataflow analysis. Records the set of
80 // live-in and live-out variables for each block. Identifies and
81 // deletes dead instructions (primarily stores).
82 Liveness_Basic,
83
84 // In addition to Liveness_Basic, also calculate the complete
85 // live range for each variable in a form suitable for interference
86 // calculation and register allocation.
87 Liveness_Intervals
88 };
89
71 enum VerboseItem { 90 enum VerboseItem {
72 IceV_None = 0, 91 IceV_None = 0,
73 IceV_Instructions = 1 << 0, 92 IceV_Instructions = 1 << 0,
74 IceV_Deleted = 1 << 1, 93 IceV_Deleted = 1 << 1,
75 IceV_InstNumbers = 1 << 2, 94 IceV_InstNumbers = 1 << 2,
76 IceV_Preds = 1 << 3, 95 IceV_Preds = 1 << 3,
77 IceV_Succs = 1 << 4, 96 IceV_Succs = 1 << 4,
78 IceV_Liveness = 1 << 5, 97 IceV_Liveness = 1 << 5,
79 IceV_RegManager = 1 << 6, 98 IceV_RegManager = 1 << 6,
80 IceV_RegOrigins = 1 << 7, 99 IceV_RegOrigins = 1 << 7,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 140
122 private: 141 private:
123 const llvm::TimeRecord Start; 142 const llvm::TimeRecord Start;
124 Timer(const Timer &) LLVM_DELETED_FUNCTION; 143 Timer(const Timer &) LLVM_DELETED_FUNCTION;
125 Timer &operator=(const Timer &) LLVM_DELETED_FUNCTION; 144 Timer &operator=(const Timer &) LLVM_DELETED_FUNCTION;
126 }; 145 };
127 146
128 } // end of namespace Ice 147 } // end of namespace Ice
129 148
130 #endif // SUBZERO_SRC_ICEDEFS_H 149 #endif // SUBZERO_SRC_ICEDEFS_H
OLDNEW
« no previous file with comments | « src/IceCfgNode.cpp ('k') | src/IceGlobalContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698