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

Side by Side Diff: src/IceCfg.cpp

Issue 787333005: Subzero: Pull the node name out of the node structure. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add a comment Created 6 years 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 26 matching lines...) Expand all
37 } 37 }
38 38
39 Cfg::~Cfg() {} 39 Cfg::~Cfg() {}
40 40
41 void Cfg::setError(const IceString &Message) { 41 void Cfg::setError(const IceString &Message) {
42 HasError = true; 42 HasError = true;
43 ErrorMessage = Message; 43 ErrorMessage = Message;
44 Ctx->getStrDump() << "ICE translation error: " << ErrorMessage << "\n"; 44 Ctx->getStrDump() << "ICE translation error: " << ErrorMessage << "\n";
45 } 45 }
46 46
47 CfgNode *Cfg::makeNode(const IceString &Name) { 47 CfgNode *Cfg::makeNode() {
48 SizeT LabelIndex = Nodes.size(); 48 SizeT LabelIndex = Nodes.size();
49 CfgNode *Node = CfgNode::create(this, LabelIndex, Name); 49 CfgNode *Node = CfgNode::create(this, LabelIndex);
50 Nodes.push_back(Node); 50 Nodes.push_back(Node);
51 return Node; 51 return Node;
52 } 52 }
53 53
54 void Cfg::addArg(Variable *Arg) { 54 void Cfg::addArg(Variable *Arg) {
55 Arg->setIsArg(); 55 Arg->setIsArg();
56 Args.push_back(Arg); 56 Args.push_back(Arg);
57 } 57 }
58 58
59 void Cfg::addImplicitArg(Variable *Arg) { 59 void Cfg::addImplicitArg(Variable *Arg) {
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 } 502 }
503 } 503 }
504 // Print each basic block 504 // Print each basic block
505 for (CfgNode *Node : Nodes) 505 for (CfgNode *Node : Nodes)
506 Node->dump(this); 506 Node->dump(this);
507 if (getContext()->isVerbose(IceV_Instructions)) 507 if (getContext()->isVerbose(IceV_Instructions))
508 Str << "}\n"; 508 Str << "}\n";
509 } 509 }
510 510
511 } // end of namespace Ice 511 } // 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