| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 /// Create a new Variable with a particular type and an optional name. The | 113 /// Create a new Variable with a particular type and an optional name. The |
| 114 /// Node argument is the node where the variable is defined. | 114 /// Node argument is the node where the variable is defined. |
| 115 // TODO(jpp): untemplate this with separate methods: makeVariable and | 115 // TODO(jpp): untemplate this with separate methods: makeVariable and |
| 116 // makeStackVariable. | 116 // makeStackVariable. |
| 117 template <typename T = Variable> T *makeVariable(Type Ty) { | 117 template <typename T = Variable> T *makeVariable(Type Ty) { |
| 118 SizeT Index = Variables.size(); | 118 SizeT Index = Variables.size(); |
| 119 auto *Var = T::create(this, Ty, Index); | 119 auto *Var = T::create(this, Ty, Index); |
| 120 Variables.push_back(Var); | 120 Variables.push_back(Var); |
| 121 return Var; | 121 return Var; |
| 122 } | 122 } |
| 123 void addVariable(Variable *Var); |
| 123 SizeT getNumVariables() const { return Variables.size(); } | 124 SizeT getNumVariables() const { return Variables.size(); } |
| 124 const VarList &getVariables() const { return Variables; } | 125 const VarList &getVariables() const { return Variables; } |
| 125 /// @} | 126 /// @} |
| 126 | 127 |
| 127 /// \name Manage arguments to the function. | 128 /// \name Manage arguments to the function. |
| 128 /// @{ | 129 /// @{ |
| 129 void addArg(Variable *Arg); | 130 void addArg(Variable *Arg); |
| 130 const VarList &getArgs() const { return Args; } | 131 const VarList &getArgs() const { return Args; } |
| 131 VarList &getArgs() { return Args; } | 132 VarList &getArgs() { return Args; } |
| 132 void addImplicitArg(Variable *Arg); | 133 void addImplicitArg(Variable *Arg); |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 using OwnerType = Cfg; | 360 using OwnerType = Cfg; |
| 360 static StringPool *getStrings(const OwnerType *PoolOwner) { | 361 static StringPool *getStrings(const OwnerType *PoolOwner) { |
| 361 return PoolOwner->getVarStrings(); | 362 return PoolOwner->getVarStrings(); |
| 362 } | 363 } |
| 363 }; | 364 }; |
| 364 using VariableString = StringID<VariableStringPoolTraits>; | 365 using VariableString = StringID<VariableStringPoolTraits>; |
| 365 | 366 |
| 366 } // end of namespace Ice | 367 } // end of namespace Ice |
| 367 | 368 |
| 368 #endif // SUBZERO_SRC_ICECFG_H | 369 #endif // SUBZERO_SRC_ICECFG_H |
| OLD | NEW |