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

Side by Side Diff: src/IceCfg.cpp

Issue 1351433002: Subzero: Validate phi instructions after CFG construction. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add the test provenance 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 | « no previous file | 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 for (SizeT Source = 0; Source < NumNodes; ++Source) { 225 for (SizeT Source = 0; Source < NumNodes; ++Source) {
226 if (Reachable.test(Source)) { 226 if (Reachable.test(Source)) {
227 Nodes[Dest] = Nodes[Source]; 227 Nodes[Dest] = Nodes[Source];
228 Nodes[Dest]->resetIndex(Dest); 228 Nodes[Dest]->resetIndex(Dest);
229 // Compute the in-edges. 229 // Compute the in-edges.
230 Nodes[Dest]->computePredecessors(); 230 Nodes[Dest]->computePredecessors();
231 ++Dest; 231 ++Dest;
232 } 232 }
233 } 233 }
234 Nodes.resize(Dest); 234 Nodes.resize(Dest);
235
236 TimerMarker T(TimerStack::TT_phiValidation, this);
237 for (CfgNode *Node : Nodes)
238 Node->validatePhis();
235 } 239 }
236 240
237 void Cfg::renumberInstructions() { 241 void Cfg::renumberInstructions() {
238 TimerMarker T(TimerStack::TT_renumberInstructions, this); 242 TimerMarker T(TimerStack::TT_renumberInstructions, this);
239 NextInstNumber = Inst::NumberInitial; 243 NextInstNumber = Inst::NumberInitial;
240 for (CfgNode *Node : Nodes) 244 for (CfgNode *Node : Nodes)
241 Node->renumberInstructions(); 245 Node->renumberInstructions();
242 } 246 }
243 247
244 // placePhiLoads() must be called before placePhiStores(). 248 // placePhiLoads() must be called before placePhiStores().
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 } 778 }
775 } 779 }
776 // Print each basic block 780 // Print each basic block
777 for (CfgNode *Node : Nodes) 781 for (CfgNode *Node : Nodes)
778 Node->dump(this); 782 Node->dump(this);
779 if (isVerbose(IceV_Instructions)) 783 if (isVerbose(IceV_Instructions))
780 Str << "}\n"; 784 Str << "}\n";
781 } 785 }
782 786
783 } // end of namespace Ice 787 } // end of namespace Ice
OLDNEW
« no previous file with comments | « no previous file | src/IceCfgNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698