| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |