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

Side by Side Diff: src/IceCfgNode.cpp

Issue 862853003: Fix build warnings (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 11 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/IceConverter.cpp » ('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/IceCfgNode.cpp - Basic block (node) implementation -----===// 1 //===- subzero/src/IceCfgNode.cpp - Basic block (node) 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 // This file implements the CfgNode class, including the complexities 10 // This file implements the CfgNode class, including the complexities
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 // 297 //
298 // Once the ordering is determined, the Cfg edge is split and the 298 // Once the ordering is determined, the Cfg edge is split and the
299 // assignment list is lowered by the target lowering layer. The 299 // assignment list is lowered by the target lowering layer. The
300 // specific placement of the new node within the Cfg node list is 300 // specific placement of the new node within the Cfg node list is
301 // deferred until later, including after empty node contraction. 301 // deferred until later, including after empty node contraction.
302 void CfgNode::advancedPhiLowering() { 302 void CfgNode::advancedPhiLowering() {
303 if (getPhis().empty()) 303 if (getPhis().empty())
304 return; 304 return;
305 305
306 // Count the number of non-deleted Phi instructions. 306 // Count the number of non-deleted Phi instructions.
307 struct { 307 struct PhiDesc {
308 InstPhi *Phi; 308 InstPhi *Phi;
309 Variable *Dest; 309 Variable *Dest;
310 Operand *Src; 310 Operand *Src;
311 bool Processed; 311 bool Processed;
312 size_t NumPred; // number of entries whose Src is this Dest 312 size_t NumPred; // number of entries whose Src is this Dest
313 int32_t Weight; // preference for topological order 313 int32_t Weight; // preference for topological order
314 } Desc[getPhis().size()]; 314 };
315 llvm::SmallVector<PhiDesc, 32> Desc(getPhis().size());
315 316
316 size_t NumPhis = 0; 317 size_t NumPhis = 0;
317 for (Inst &I : Phis) { 318 for (Inst &I : Phis) {
318 auto Inst = llvm::dyn_cast<InstPhi>(&I); 319 auto Inst = llvm::dyn_cast<InstPhi>(&I);
319 if (!Inst->isDeleted()) { 320 if (!Inst->isDeleted()) {
320 Desc[NumPhis].Phi = Inst; 321 Desc[NumPhis].Phi = Inst;
321 Desc[NumPhis].Dest = Inst->getDest(); 322 Desc[NumPhis].Dest = Inst->getDest();
322 ++NumPhis; 323 ++NumPhis;
323 } 324 }
324 } 325 }
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 if (!First) 983 if (!First)
983 Str << ", "; 984 Str << ", ";
984 First = false; 985 First = false;
985 Str << "%" << I->getName(); 986 Str << "%" << I->getName();
986 } 987 }
987 Str << "\n"; 988 Str << "\n";
988 } 989 }
989 } 990 }
990 991
991 } // end of namespace Ice 992 } // end of namespace Ice
OLDNEW
« no previous file with comments | « no previous file | src/IceConverter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698