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

Side by Side Diff: src/IceCfg.cpp

Issue 656123003: Subzero: Class definition cleanup. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Changes for Karl Created 6 years, 2 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 30 matching lines...) Expand all
41 Ctx->getStrDump() << "ICE translation error: " << ErrorMessage << "\n"; 41 Ctx->getStrDump() << "ICE translation error: " << ErrorMessage << "\n";
42 } 42 }
43 43
44 CfgNode *Cfg::makeNode(const IceString &Name) { 44 CfgNode *Cfg::makeNode(const IceString &Name) {
45 SizeT LabelIndex = Nodes.size(); 45 SizeT LabelIndex = Nodes.size();
46 CfgNode *Node = CfgNode::create(this, LabelIndex, Name); 46 CfgNode *Node = CfgNode::create(this, LabelIndex, Name);
47 Nodes.push_back(Node); 47 Nodes.push_back(Node);
48 return Node; 48 return Node;
49 } 49 }
50 50
51 Variable *Cfg::makeVariable(Type Ty, const IceString &Name) {
52 return makeVariable<Variable>(Ty, Name);
53 }
54
55 void Cfg::addArg(Variable *Arg) { 51 void Cfg::addArg(Variable *Arg) {
56 Arg->setIsArg(); 52 Arg->setIsArg();
57 Args.push_back(Arg); 53 Args.push_back(Arg);
58 } 54 }
59 55
60 void Cfg::addImplicitArg(Variable *Arg) { 56 void Cfg::addImplicitArg(Variable *Arg) {
61 Arg->setIsImplicitArg(); 57 Arg->setIsImplicitArg();
62 ImplicitArgs.push_back(Arg); 58 ImplicitArgs.push_back(Arg);
63 } 59 }
64 60
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 } 373 }
378 } 374 }
379 // Print each basic block 375 // Print each basic block
380 for (CfgNode *Node : Nodes) 376 for (CfgNode *Node : Nodes)
381 Node->dump(this); 377 Node->dump(this);
382 if (getContext()->isVerbose(IceV_Instructions)) 378 if (getContext()->isVerbose(IceV_Instructions))
383 Str << "}\n"; 379 Str << "}\n";
384 } 380 }
385 381
386 } // end of namespace Ice 382 } // 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