| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 125 |
| 126 /// \name Manage Variables. | 126 /// \name Manage Variables. |
| 127 /// @{ | 127 /// @{ |
| 128 | 128 |
| 129 /// Create a new Variable with a particular type and an optional name. The | 129 /// Create a new Variable with a particular type and an optional name. The |
| 130 /// Node argument is the node where the variable is defined. | 130 /// Node argument is the node where the variable is defined. |
| 131 // TODO(jpp): untemplate this with separate methods: makeVariable, | 131 // TODO(jpp): untemplate this with separate methods: makeVariable, |
| 132 // makeSpillVariable, and makeStackVariable. | 132 // makeSpillVariable, and makeStackVariable. |
| 133 template <typename T = Variable> T *makeVariable(Type Ty) { | 133 template <typename T = Variable> T *makeVariable(Type Ty) { |
| 134 SizeT Index = Variables.size(); | 134 SizeT Index = Variables.size(); |
| 135 T *Var = T::create(this, Ty, Index); | 135 auto *Var = T::create(this, Ty, Index); |
| 136 Variables.push_back(Var); | 136 Variables.push_back(Var); |
| 137 return Var; | 137 return Var; |
| 138 } | 138 } |
| 139 SizeT getNumVariables() const { return Variables.size(); } | 139 SizeT getNumVariables() const { return Variables.size(); } |
| 140 const VarList &getVariables() const { return Variables; } | 140 const VarList &getVariables() const { return Variables; } |
| 141 /// @} | 141 /// @} |
| 142 | 142 |
| 143 /// \name Manage arguments to the function. | 143 /// \name Manage arguments to the function. |
| 144 /// @{ | 144 /// @{ |
| 145 void addArg(Variable *Arg); | 145 void addArg(Variable *Arg); |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 | 309 |
| 310 public: | 310 public: |
| 311 static void TlsInit() { ICE_TLS_INIT_FIELD(CurrentCfg); } | 311 static void TlsInit() { ICE_TLS_INIT_FIELD(CurrentCfg); } |
| 312 }; | 312 }; |
| 313 | 313 |
| 314 template <> Variable *Cfg::makeVariable<Variable>(Type Ty); | 314 template <> Variable *Cfg::makeVariable<Variable>(Type Ty); |
| 315 | 315 |
| 316 } // end of namespace Ice | 316 } // end of namespace Ice |
| 317 | 317 |
| 318 #endif // SUBZERO_SRC_ICECFG_H | 318 #endif // SUBZERO_SRC_ICECFG_H |
| OLD | NEW |