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

Side by Side Diff: src/IceCfg.h

Issue 2107073002: Subzero: Merge SpillVariable functionality directly into Variable. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review comments. Created 4 years, 5 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 | « no previous file | src/IceOperand.h » ('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/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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 /// @{ 104 /// @{
105 InstNumberT newInstNumber() { return NextInstNumber++; } 105 InstNumberT newInstNumber() { return NextInstNumber++; }
106 InstNumberT getNextInstNumber() const { return NextInstNumber; } 106 InstNumberT getNextInstNumber() const { return NextInstNumber; }
107 /// @} 107 /// @}
108 108
109 /// \name Manage Variables. 109 /// \name Manage Variables.
110 /// @{ 110 /// @{
111 111
112 /// Create a new Variable with a particular type and an optional name. The 112 /// Create a new Variable with a particular type and an optional name. The
113 /// Node argument is the node where the variable is defined. 113 /// Node argument is the node where the variable is defined.
114 // TODO(jpp): untemplate this with separate methods: makeVariable, 114 // TODO(jpp): untemplate this with separate methods: makeVariable and
115 // makeSpillVariable, and makeStackVariable. 115 // makeStackVariable.
116 template <typename T = Variable> T *makeVariable(Type Ty) { 116 template <typename T = Variable> T *makeVariable(Type Ty) {
117 SizeT Index = Variables.size(); 117 SizeT Index = Variables.size();
118 auto *Var = T::create(this, Ty, Index); 118 auto *Var = T::create(this, Ty, Index);
119 Variables.push_back(Var); 119 Variables.push_back(Var);
120 return Var; 120 return Var;
121 } 121 }
122 SizeT getNumVariables() const { return Variables.size(); } 122 SizeT getNumVariables() const { return Variables.size(); }
123 const VarList &getVariables() const { return Variables; } 123 const VarList &getVariables() const { return Variables; }
124 /// @} 124 /// @}
125 125
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 using OwnerType = Cfg; 355 using OwnerType = Cfg;
356 static StringPool *getStrings(const OwnerType *PoolOwner) { 356 static StringPool *getStrings(const OwnerType *PoolOwner) {
357 return PoolOwner->getVarStrings(); 357 return PoolOwner->getVarStrings();
358 } 358 }
359 }; 359 };
360 using VariableString = StringID<VariableStringPoolTraits>; 360 using VariableString = StringID<VariableStringPoolTraits>;
361 361
362 } // end of namespace Ice 362 } // end of namespace Ice
363 363
364 #endif // SUBZERO_SRC_ICECFG_H 364 #endif // SUBZERO_SRC_ICECFG_H
OLDNEW
« no previous file with comments | « no previous file | src/IceOperand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698