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

Side by Side Diff: src/IceCfg.h

Issue 1197223002: Subzero: Use C++11 member initializers where practical. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Rebase 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 | « src/IceBrowserCompileServer.cpp ('k') | src/IceCfg.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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 void addCallToProfileSummary(); 200 void addCallToProfileSummary();
201 201
202 // Iterates over the basic blocks in this CFG, adding profiling code to each 202 // Iterates over the basic blocks in this CFG, adding profiling code to each
203 // one of them. It returns a list with all the globals that the profiling code 203 // one of them. It returns a list with all the globals that the profiling code
204 // needs to be defined. 204 // needs to be defined.
205 void profileBlocks(); 205 void profileBlocks();
206 206
207 GlobalContext *Ctx; 207 GlobalContext *Ctx;
208 uint32_t SequenceNumber; // output order for emission 208 uint32_t SequenceNumber; // output order for emission
209 VerboseMask VMask; 209 VerboseMask VMask;
210 IceString FunctionName; 210 IceString FunctionName = "";
211 Type ReturnType; 211 Type ReturnType = IceType_void;
212 bool IsInternalLinkage; 212 bool IsInternalLinkage = false;
213 bool HasError; 213 bool HasError = false;
214 bool FocusedTiming; 214 bool FocusedTiming = false;
215 IceString ErrorMessage; 215 IceString ErrorMessage = "";
216 CfgNode *Entry; // entry basic block 216 CfgNode *Entry = nullptr; // entry basic block
217 NodeList Nodes; // linearized node list; Entry should be first 217 NodeList Nodes; // linearized node list; Entry should be first
218 std::vector<IceString> IdentifierNames; 218 std::vector<IceString> IdentifierNames;
219 InstNumberT NextInstNumber; 219 InstNumberT NextInstNumber;
220 VarList Variables; 220 VarList Variables;
221 VarList Args; // subset of Variables, in argument order 221 VarList Args; // subset of Variables, in argument order
222 VarList ImplicitArgs; // subset of Variables 222 VarList ImplicitArgs; // subset of Variables
223 std::unique_ptr<ArenaAllocator<>> Allocator; 223 std::unique_ptr<ArenaAllocator<>> Allocator;
224 std::unique_ptr<Liveness> Live; 224 std::unique_ptr<Liveness> Live;
225 std::unique_ptr<TargetLowering> Target; 225 std::unique_ptr<TargetLowering> Target;
226 std::unique_ptr<VariablesMetadata> VMetadata; 226 std::unique_ptr<VariablesMetadata> VMetadata;
227 std::unique_ptr<Assembler> TargetAssembler; 227 std::unique_ptr<Assembler> TargetAssembler;
228 // Globals required by this CFG. Mostly used for the profiler's globals. 228 // Globals required by this CFG. Mostly used for the profiler's globals.
229 std::unique_ptr<VariableDeclarationList> GlobalInits; 229 std::unique_ptr<VariableDeclarationList> GlobalInits;
230 230
231 // CurrentNode is maintained during dumping/emitting just for 231 // CurrentNode is maintained during dumping/emitting just for
232 // validating Variable::DefNode. Normally, a traversal over 232 // validating Variable::DefNode. Normally, a traversal over
233 // CfgNodes maintains this, but before global operations like 233 // CfgNodes maintains this, but before global operations like
234 // register allocation, resetCurrentNode() should be called to avoid 234 // register allocation, resetCurrentNode() should be called to avoid
235 // spurious validation failures. 235 // spurious validation failures.
236 const CfgNode *CurrentNode; 236 const CfgNode *CurrentNode = nullptr;
237 237
238 // Maintain a pointer in TLS to the current Cfg being translated. 238 // Maintain a pointer in TLS to the current Cfg being translated.
239 // This is primarily for accessing its allocator statelessly, but 239 // This is primarily for accessing its allocator statelessly, but
240 // other uses are possible. 240 // other uses are possible.
241 ICE_TLS_DECLARE_FIELD(const Cfg *, CurrentCfg); 241 ICE_TLS_DECLARE_FIELD(const Cfg *, CurrentCfg);
242 242
243 public: 243 public:
244 static void TlsInit() { ICE_TLS_INIT_FIELD(CurrentCfg); } 244 static void TlsInit() { ICE_TLS_INIT_FIELD(CurrentCfg); }
245 }; 245 };
246 246
247 } // end of namespace Ice 247 } // end of namespace Ice
248 248
249 #endif // SUBZERO_SRC_ICECFG_H 249 #endif // SUBZERO_SRC_ICECFG_H
OLDNEW
« no previous file with comments | « src/IceBrowserCompileServer.cpp ('k') | src/IceCfg.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698