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

Side by Side Diff: src/IceCfg.h

Issue 1208663002: Fixes the X86 Base template. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: "Addresses comments && clang-format" Created 5 years, 6 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/IceTargetLoweringX8632.cpp » ('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 // This file declares the Cfg class, which represents the control flow 10 // This file declares the Cfg class, which represents the control flow
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 97 }
98 enum { IdentifierIndexInvalid = -1 }; 98 enum { IdentifierIndexInvalid = -1 };
99 99
100 // Manage instruction numbering. 100 // Manage instruction numbering.
101 InstNumberT newInstNumber() { return NextInstNumber++; } 101 InstNumberT newInstNumber() { return NextInstNumber++; }
102 InstNumberT getNextInstNumber() const { return NextInstNumber; } 102 InstNumberT getNextInstNumber() const { return NextInstNumber; }
103 103
104 // Manage Variables. 104 // Manage Variables.
105 // Create a new Variable with a particular type and an optional 105 // Create a new Variable with a particular type and an optional
106 // name. The Node argument is the node where the variable is defined. 106 // name. The Node argument is the node where the variable is defined.
107 // TODO(jpp): untemplate this with two separate methods: makeVariable and
108 // makeSpillVariable.
107 template <typename T = Variable> T *makeVariable(Type Ty) { 109 template <typename T = Variable> T *makeVariable(Type Ty) {
108 SizeT Index = Variables.size(); 110 SizeT Index = Variables.size();
109 T *Var = T::create(this, Ty, Index); 111 T *Var = T::create(this, Ty, Index);
110 Variables.push_back(Var); 112 Variables.push_back(Var);
111 return Var; 113 return Var;
112 } 114 }
113 SizeT getNumVariables() const { return Variables.size(); } 115 SizeT getNumVariables() const { return Variables.size(); }
114 const VarList &getVariables() const { return Variables; } 116 const VarList &getVariables() const { return Variables; }
115 117
116 // Manage arguments to the function. 118 // Manage arguments to the function.
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 // other uses are possible. 242 // other uses are possible.
241 ICE_TLS_DECLARE_FIELD(const Cfg *, CurrentCfg); 243 ICE_TLS_DECLARE_FIELD(const Cfg *, CurrentCfg);
242 244
243 public: 245 public:
244 static void TlsInit() { ICE_TLS_INIT_FIELD(CurrentCfg); } 246 static void TlsInit() { ICE_TLS_INIT_FIELD(CurrentCfg); }
245 }; 247 };
246 248
247 } // end of namespace Ice 249 } // end of namespace Ice
248 250
249 #endif // SUBZERO_SRC_ICECFG_H 251 #endif // SUBZERO_SRC_ICECFG_H
OLDNEW
« no previous file with comments | « no previous file | src/IceTargetLoweringX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698