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

Side by Side Diff: src/IceOperand.cpp

Issue 709533002: Subzero: Implement InstList in terms of llvm::ilist<> . (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add a comment explaining the ilist traits specialization Created 6 years, 1 month 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 | « src/IceInst.h ('k') | src/IceTargetLowering.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/IceOperand.cpp - High-level operand implementation -----===// 1 //===- subzero/src/IceOperand.cpp - High-level operand 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 Operand class and its target-independent 10 // This file implements the Operand class and its target-independent
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 if (const Variable *Var = llvm::dyn_cast<Variable>(I->getSrc(SrcNum))) { 340 if (const Variable *Var = llvm::dyn_cast<Variable>(I->getSrc(SrcNum))) {
341 SizeT VarNum = Var->getIndex(); 341 SizeT VarNum = Var->getIndex();
342 assert(VarNum < Metadata.size()); 342 assert(VarNum < Metadata.size());
343 const bool IsFromDef = false; 343 const bool IsFromDef = false;
344 const bool IsImplicit = false; 344 const bool IsImplicit = false;
345 Metadata[VarNum].markUse(Kind, I, Node, IsFromDef, IsImplicit); 345 Metadata[VarNum].markUse(Kind, I, Node, IsFromDef, IsImplicit);
346 } 346 }
347 } 347 }
348 } 348 }
349 349
350 for (Inst *I : Node->getInsts()) { 350 for (auto I = Node->getInsts().begin(), E = Node->getInsts().end(); I != E;
351 ++I) {
351 if (I->isDeleted()) 352 if (I->isDeleted())
352 continue; 353 continue;
353 // Note: The implicit definitions (and uses) from InstFakeKill are 354 // Note: The implicit definitions (and uses) from InstFakeKill are
354 // deliberately ignored. 355 // deliberately ignored.
355 if (Variable *Dest = I->getDest()) { 356 if (Variable *Dest = I->getDest()) {
356 SizeT DestNum = Dest->getIndex(); 357 SizeT DestNum = Dest->getIndex();
357 assert(DestNum < Metadata.size()); 358 assert(DestNum < Metadata.size());
358 Metadata[DestNum].markDef(Kind, I, Node); 359 Metadata[DestNum].markDef(Kind, I, Node);
359 } 360 }
360 for (SizeT SrcNum = 0; SrcNum < I->getSrcSize(); ++SrcNum) { 361 for (SizeT SrcNum = 0; SrcNum < I->getSrcSize(); ++SrcNum) {
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 509
509 Ostream &operator<<(Ostream &Str, const RegWeight &W) { 510 Ostream &operator<<(Ostream &Str, const RegWeight &W) {
510 if (W.getWeight() == RegWeight::Inf) 511 if (W.getWeight() == RegWeight::Inf)
511 Str << "Inf"; 512 Str << "Inf";
512 else 513 else
513 Str << W.getWeight(); 514 Str << W.getWeight();
514 return Str; 515 return Str;
515 } 516 }
516 517
517 } // end of namespace Ice 518 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceInst.h ('k') | src/IceTargetLowering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698