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

Side by Side Diff: src/IceCfg.cpp

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/IceCfg.h ('k') | src/IceCfgNode.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.cpp - Control flow graph implementation ---------===// 1 //===- subzero/src/IceCfg.cpp - Control flow graph implementation ---------===//
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 implements the Cfg class, including constant pool 10 // This file implements the Cfg class, including constant pool
(...skipping 16 matching lines...) Expand all
27 namespace Ice { 27 namespace Ice {
28 28
29 ICE_TLS_DEFINE_FIELD(const Cfg *, Cfg, CurrentCfg); 29 ICE_TLS_DEFINE_FIELD(const Cfg *, Cfg, CurrentCfg);
30 30
31 ArenaAllocator<> *getCurrentCfgAllocator() { 31 ArenaAllocator<> *getCurrentCfgAllocator() {
32 return Cfg::getCurrentCfgAllocator(); 32 return Cfg::getCurrentCfgAllocator();
33 } 33 }
34 34
35 Cfg::Cfg(GlobalContext *Ctx, uint32_t SequenceNumber) 35 Cfg::Cfg(GlobalContext *Ctx, uint32_t SequenceNumber)
36 : Ctx(Ctx), SequenceNumber(SequenceNumber), 36 : Ctx(Ctx), SequenceNumber(SequenceNumber),
37 VMask(Ctx->getFlags().getVerbose()), FunctionName(""), 37 VMask(Ctx->getFlags().getVerbose()), NextInstNumber(Inst::NumberInitial),
38 ReturnType(IceType_void), IsInternalLinkage(false), HasError(false), 38 Allocator(new ArenaAllocator<>()), Live(nullptr),
39 FocusedTiming(false), ErrorMessage(""), Entry(nullptr), 39 Target(TargetLowering::createLowering(Ctx->getFlags().getTargetArch(),
40 NextInstNumber(Inst::NumberInitial), Allocator(new ArenaAllocator<>()), 40 this)),
41 Live(nullptr), Target(TargetLowering::createLowering(
42 Ctx->getFlags().getTargetArch(), this)),
43 VMetadata(new VariablesMetadata(this)), 41 VMetadata(new VariablesMetadata(this)),
44 TargetAssembler(TargetLowering::createAssembler( 42 TargetAssembler(TargetLowering::createAssembler(
45 Ctx->getFlags().getTargetArch(), this)), 43 Ctx->getFlags().getTargetArch(), this)) {
46 CurrentNode(nullptr) {
47 assert(!Ctx->isIRGenerationDisabled() && 44 assert(!Ctx->isIRGenerationDisabled() &&
48 "Attempt to build cfg when IR generation disabled"); 45 "Attempt to build cfg when IR generation disabled");
49 } 46 }
50 47
51 Cfg::~Cfg() { assert(ICE_TLS_GET_FIELD(CurrentCfg) == nullptr); } 48 Cfg::~Cfg() { assert(ICE_TLS_GET_FIELD(CurrentCfg) == nullptr); }
52 49
53 void Cfg::setError(const IceString &Message) { 50 void Cfg::setError(const IceString &Message) {
54 HasError = true; 51 HasError = true;
55 ErrorMessage = Message; 52 ErrorMessage = Message;
56 } 53 }
(...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 } 616 }
620 } 617 }
621 // Print each basic block 618 // Print each basic block
622 for (CfgNode *Node : Nodes) 619 for (CfgNode *Node : Nodes)
623 Node->dump(this); 620 Node->dump(this);
624 if (isVerbose(IceV_Instructions)) 621 if (isVerbose(IceV_Instructions))
625 Str << "}\n"; 622 Str << "}\n";
626 } 623 }
627 624
628 } // end of namespace Ice 625 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceCfg.h ('k') | src/IceCfgNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698