OLD | NEW |
1 //===- subzero/src/IceCfg.h - Control flow graph ----------------*- C++ -*-===// | 1 //===- subzero/src/IceCfg.h - Control flow graph ----------------*- 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 /// @{ | 112 /// @{ |
113 InstNumberT newInstNumber() { return NextInstNumber++; } | 113 InstNumberT newInstNumber() { return NextInstNumber++; } |
114 InstNumberT getNextInstNumber() const { return NextInstNumber; } | 114 InstNumberT getNextInstNumber() const { return NextInstNumber; } |
115 /// @} | 115 /// @} |
116 | 116 |
117 /// \name Manage Variables. | 117 /// \name Manage Variables. |
118 /// @{ | 118 /// @{ |
119 | 119 |
120 /// Create a new Variable with a particular type and an optional | 120 /// Create a new Variable with a particular type and an optional |
121 /// name. The Node argument is the node where the variable is defined. | 121 /// name. The Node argument is the node where the variable is defined. |
122 // TODO(jpp): untemplate this with two separate methods: makeVariable and | 122 // TODO(jpp): untemplate this with separate methods: makeVariable, |
123 // makeSpillVariable. | 123 // makeSpillVariable, and makeStackVariable. |
124 template <typename T = Variable> T *makeVariable(Type Ty) { | 124 template <typename T = Variable> T *makeVariable(Type Ty) { |
125 SizeT Index = Variables.size(); | 125 SizeT Index = Variables.size(); |
126 T *Var = T::create(this, Ty, Index); | 126 T *Var = T::create(this, Ty, Index); |
127 Variables.push_back(Var); | 127 Variables.push_back(Var); |
128 return Var; | 128 return Var; |
129 } | 129 } |
130 SizeT getNumVariables() const { return Variables.size(); } | 130 SizeT getNumVariables() const { return Variables.size(); } |
131 const VarList &getVariables() const { return Variables; } | 131 const VarList &getVariables() const { return Variables; } |
132 /// @} | 132 /// @} |
133 | 133 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 /// other uses are possible. | 265 /// other uses are possible. |
266 ICE_TLS_DECLARE_FIELD(const Cfg *, CurrentCfg); | 266 ICE_TLS_DECLARE_FIELD(const Cfg *, CurrentCfg); |
267 | 267 |
268 public: | 268 public: |
269 static void TlsInit() { ICE_TLS_INIT_FIELD(CurrentCfg); } | 269 static void TlsInit() { ICE_TLS_INIT_FIELD(CurrentCfg); } |
270 }; | 270 }; |
271 | 271 |
272 } // end of namespace Ice | 272 } // end of namespace Ice |
273 | 273 |
274 #endif // SUBZERO_SRC_ICECFG_H | 274 #endif // SUBZERO_SRC_ICECFG_H |
OLD | NEW |