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

Side by Side Diff: src/IceCfg.cpp

Issue 1890283002: Subzero, Wasm: Link and run torture tests; bug fixes. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review feedback Created 4 years, 8 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 | « runtime/wasm-runtime.c ('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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 assert(Phi); 254 assert(Phi);
255 for (SizeT i = 0; i < InEdges.size(); ++i) { 255 for (SizeT i = 0; i < InEdges.size(); ++i) {
256 Phi->setLabel(i, InEdges[i]); 256 Phi->setLabel(i, InEdges[i]);
257 } 257 }
258 } 258 }
259 } 259 }
260 } 260 }
261 261
262 void Cfg::computeInOutEdges() { 262 void Cfg::computeInOutEdges() {
263 // Compute the out-edges. 263 // Compute the out-edges.
264 for (CfgNode *Node : Nodes) 264 for (CfgNode *Node : Nodes) {
265 Node->computeSuccessors(); 265 Node->computeSuccessors();
266 }
266 267
267 // Prune any unreachable nodes before computing in-edges. 268 // Prune any unreachable nodes before computing in-edges.
268 SizeT NumNodes = getNumNodes(); 269 SizeT NumNodes = getNumNodes();
269 BitVector Reachable(NumNodes); 270 BitVector Reachable(NumNodes);
270 BitVector Pending(NumNodes); 271 BitVector Pending(NumNodes);
271 Pending.set(getEntryNode()->getIndex()); 272 Pending.set(getEntryNode()->getIndex());
272 while (true) { 273 while (true) {
273 int Index = Pending.find_first(); 274 int Index = Pending.find_first();
274 if (Index == -1) 275 if (Index == -1)
275 break; 276 break;
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 } 1167 }
1167 } 1168 }
1168 // Print each basic block 1169 // Print each basic block
1169 for (CfgNode *Node : Nodes) 1170 for (CfgNode *Node : Nodes)
1170 Node->dump(this); 1171 Node->dump(this);
1171 if (isVerbose(IceV_Instructions)) 1172 if (isVerbose(IceV_Instructions))
1172 Str << "}\n"; 1173 Str << "}\n";
1173 } 1174 }
1174 1175
1175 } // end of namespace Ice 1176 } // end of namespace Ice
OLDNEW
« no previous file with comments | « runtime/wasm-runtime.c ('k') | src/IceCfgNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698