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

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: Created 6 years, 7 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
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 enum LivenessMode {
74 // Lightweight version of live-range-end calculation. Marks the
75 // last use of variables whose definition and uses are completely
76 // within a single block.
77 Liveness_LREndLightweight,
78
79 // Full version of live-range-end calculation. Marks the last uses
80 // of variables based on dataflow analysis. Records the set of
81 // live-in and live-out variables for each block. Identifies and
82 // deletes dead instructions (primarily stores).
83 Liveness_LREndFull,
84
85 // In addition to Liveness_LREndFull, also calculate the complete
86 // live range for each variable in a form suitable for interference
87 // calculation and register allocation.
88 Liveness_RangesFull
89 };
90
71 enum VerboseItem { 91 enum VerboseItem {
72 IceV_None = 0, 92 IceV_None = 0,
73 IceV_Instructions = 1 << 0, 93 IceV_Instructions = 1 << 0,
74 IceV_Deleted = 1 << 1, 94 IceV_Deleted = 1 << 1,
75 IceV_InstNumbers = 1 << 2, 95 IceV_InstNumbers = 1 << 2,
76 IceV_Preds = 1 << 3, 96 IceV_Preds = 1 << 3,
77 IceV_Succs = 1 << 4, 97 IceV_Succs = 1 << 4,
78 IceV_Liveness = 1 << 5, 98 IceV_Liveness = 1 << 5,
79 IceV_RegManager = 1 << 6, 99 IceV_RegManager = 1 << 6,
80 IceV_RegOrigins = 1 << 7, 100 IceV_RegOrigins = 1 << 7,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 141
122 private: 142 private:
123 const llvm::TimeRecord Start; 143 const llvm::TimeRecord Start;
124 Timer(const Timer &) LLVM_DELETED_FUNCTION; 144 Timer(const Timer &) LLVM_DELETED_FUNCTION;
125 Timer &operator=(const Timer &) LLVM_DELETED_FUNCTION; 145 Timer &operator=(const Timer &) LLVM_DELETED_FUNCTION;
126 }; 146 };
127 147
128 } // end of namespace Ice 148 } // end of namespace Ice
129 149
130 #endif // SUBZERO_SRC_ICEDEFS_H 150 #endif // SUBZERO_SRC_ICEDEFS_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698