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

Side by Side Diff: src/IceCfg.cpp

Issue 1847423003: Replace constant conditional branches by unconditional branches (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review fixes 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 | « no previous file | src/IceCfgNode.h » ('j') | src/IceCfgNode.cpp » ('J')
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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 Nodes[Dest]->resetIndex(Dest); 276 Nodes[Dest]->resetIndex(Dest);
277 // Compute the in-edges. 277 // Compute the in-edges.
278 Nodes[Dest]->computePredecessors(); 278 Nodes[Dest]->computePredecessors();
279 ++Dest; 279 ++Dest;
280 } 280 }
281 } 281 }
282 Nodes.resize(Dest); 282 Nodes.resize(Dest);
283 283
284 TimerMarker T(TimerStack::TT_phiValidation, this); 284 TimerMarker T(TimerStack::TT_phiValidation, this);
285 for (CfgNode *Node : Nodes) 285 for (CfgNode *Node : Nodes)
286 Node->validatePhis(); 286 Node->enforcePhiConsistency();
287 } 287 }
288 288
289 void Cfg::renumberInstructions() { 289 void Cfg::renumberInstructions() {
290 TimerMarker T(TimerStack::TT_renumberInstructions, this); 290 TimerMarker T(TimerStack::TT_renumberInstructions, this);
291 NextInstNumber = Inst::NumberInitial; 291 NextInstNumber = Inst::NumberInitial;
292 for (CfgNode *Node : Nodes) 292 for (CfgNode *Node : Nodes)
293 Node->renumberInstructions(); 293 Node->renumberInstructions();
294 // Make sure the entry node is the first node and therefore got the lowest 294 // Make sure the entry node is the first node and therefore got the lowest
295 // instruction numbers, to facilitate live range computation of function 295 // instruction numbers, to facilitate live range computation of function
296 // arguments. We want to model function arguments as being live on entry to 296 // arguments. We want to model function arguments as being live on entry to
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 } 1165 }
1166 } 1166 }
1167 // Print each basic block 1167 // Print each basic block
1168 for (CfgNode *Node : Nodes) 1168 for (CfgNode *Node : Nodes)
1169 Node->dump(this); 1169 Node->dump(this);
1170 if (isVerbose(IceV_Instructions)) 1170 if (isVerbose(IceV_Instructions))
1171 Str << "}\n"; 1171 Str << "}\n";
1172 } 1172 }
1173 1173
1174 } // end of namespace Ice 1174 } // end of namespace Ice
OLDNEW
« no previous file with comments | « no previous file | src/IceCfgNode.h » ('j') | src/IceCfgNode.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698