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

Side by Side Diff: src/IceCfg.cpp

Issue 1293343003: Change to use arena allocation for function-local data in parser. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 5 years, 4 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/IceDefs.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 /// \file 10 /// \file
(...skipping 25 matching lines...) Expand all
36 36
37 Cfg::Cfg(GlobalContext *Ctx, uint32_t SequenceNumber) 37 Cfg::Cfg(GlobalContext *Ctx, uint32_t SequenceNumber)
38 : Ctx(Ctx), SequenceNumber(SequenceNumber), 38 : Ctx(Ctx), SequenceNumber(SequenceNumber),
39 VMask(Ctx->getFlags().getVerbose()), NextInstNumber(Inst::NumberInitial), 39 VMask(Ctx->getFlags().getVerbose()), NextInstNumber(Inst::NumberInitial),
40 Allocator(new ArenaAllocator<>()), Live(nullptr), 40 Allocator(new ArenaAllocator<>()), Live(nullptr),
41 Target(TargetLowering::createLowering(Ctx->getFlags().getTargetArch(), 41 Target(TargetLowering::createLowering(Ctx->getFlags().getTargetArch(),
42 this)), 42 this)),
43 VMetadata(new VariablesMetadata(this)), 43 VMetadata(new VariablesMetadata(this)),
44 TargetAssembler(TargetLowering::createAssembler( 44 TargetAssembler(TargetLowering::createAssembler(
45 Ctx->getFlags().getTargetArch(), this)) { 45 Ctx->getFlags().getTargetArch(), this)) {
46 assert(!Ctx->isIRGenerationDisabled() &&
47 "Attempt to build cfg when IR generation disabled");
48 } 46 }
49 47
50 Cfg::~Cfg() { assert(ICE_TLS_GET_FIELD(CurrentCfg) == nullptr); } 48 Cfg::~Cfg() { assert(ICE_TLS_GET_FIELD(CurrentCfg) == nullptr); }
51 49
52 void Cfg::setError(const IceString &Message) { 50 void Cfg::setError(const IceString &Message) {
53 HasError = true; 51 HasError = true;
54 ErrorMessage = Message; 52 ErrorMessage = Message;
55 } 53 }
56 54
57 CfgNode *Cfg::makeNode() { 55 CfgNode *Cfg::makeNode() {
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 } 759 }
762 } 760 }
763 // Print each basic block 761 // Print each basic block
764 for (CfgNode *Node : Nodes) 762 for (CfgNode *Node : Nodes)
765 Node->dump(this); 763 Node->dump(this);
766 if (isVerbose(IceV_Instructions)) 764 if (isVerbose(IceV_Instructions))
767 Str << "}\n"; 765 Str << "}\n";
768 } 766 }
769 767
770 } // end of namespace Ice 768 } // end of namespace Ice
OLDNEW
« no previous file with comments | « no previous file | src/IceDefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698