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