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

Side by Side Diff: src/IceCfg.cpp

Issue 1341613002: Subzero: Fix labels for block profiling. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 5 years, 3 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 /// \file 10 /// \file
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 63 }
64 64
65 CfgNode *Cfg::makeNode() { 65 CfgNode *Cfg::makeNode() {
66 SizeT LabelIndex = Nodes.size(); 66 SizeT LabelIndex = Nodes.size();
67 CfgNode *Node = CfgNode::create(this, LabelIndex); 67 CfgNode *Node = CfgNode::create(this, LabelIndex);
68 Nodes.push_back(Node); 68 Nodes.push_back(Node);
69 return Node; 69 return Node;
70 } 70 }
71 71
72 void Cfg::swapNodes(NodeList &NewNodes) { 72 void Cfg::swapNodes(NodeList &NewNodes) {
73 assert(Nodes.size() == NewNodes.size());
73 Nodes.swap(NewNodes); 74 Nodes.swap(NewNodes);
74 for (SizeT I = 0, NumNodes = getNumNodes(); I < NumNodes; ++I) 75 for (SizeT I = 0, NumNodes = getNumNodes(); I < NumNodes; ++I)
75 Nodes[I]->resetIndex(I); 76 Nodes[I]->resetIndex(I);
76 } 77 }
77 78
78 void Cfg::addArg(Variable *Arg) { 79 void Cfg::addArg(Variable *Arg) {
79 Arg->setIsArg(); 80 Arg->setIsArg();
80 Args.push_back(Arg); 81 Args.push_back(Arg);
81 } 82 }
82 83
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 } 774 }
774 } 775 }
775 // Print each basic block 776 // Print each basic block
776 for (CfgNode *Node : Nodes) 777 for (CfgNode *Node : Nodes)
777 Node->dump(this); 778 Node->dump(this);
778 if (isVerbose(IceV_Instructions)) 779 if (isVerbose(IceV_Instructions))
779 Str << "}\n"; 780 Str << "}\n";
780 } 781 }
781 782
782 } // end of namespace Ice 783 } // 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