OLD | NEW |
1 //===- subzero/src/IceInst.cpp - High-level instruction implementation ----===// | 1 //===- subzero/src/IceInst.cpp - High-level instruction 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 Inst class, primarily the various | 10 // This file implements the Inst class, primarily the various |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 InstFakeUse::InstFakeUse(Cfg *Func, Variable *Src) | 413 InstFakeUse::InstFakeUse(Cfg *Func, Variable *Src) |
414 : InstHighLevel(Func, Inst::FakeUse, 1, NULL) { | 414 : InstHighLevel(Func, Inst::FakeUse, 1, NULL) { |
415 assert(Src); | 415 assert(Src); |
416 addSource(Src); | 416 addSource(Src); |
417 } | 417 } |
418 | 418 |
419 InstFakeKill::InstFakeKill(Cfg *Func, const VarList &KilledRegs, | 419 InstFakeKill::InstFakeKill(Cfg *Func, const VarList &KilledRegs, |
420 const Inst *Linked) | 420 const Inst *Linked) |
421 : InstHighLevel(Func, Inst::FakeKill, KilledRegs.size(), NULL), | 421 : InstHighLevel(Func, Inst::FakeKill, KilledRegs.size(), NULL), |
422 Linked(Linked) { | 422 Linked(Linked) { |
423 for (VarList::const_iterator I = KilledRegs.begin(), E = KilledRegs.end(); | 423 for (Variable *Var : KilledRegs) |
424 I != E; ++I) { | |
425 Variable *Var = *I; | |
426 addSource(Var); | 424 addSource(Var); |
427 } | |
428 } | 425 } |
429 | 426 |
430 // ======================== Dump routines ======================== // | 427 // ======================== Dump routines ======================== // |
431 | 428 |
432 void Inst::dumpDecorated(const Cfg *Func) const { | 429 void Inst::dumpDecorated(const Cfg *Func) const { |
433 Ostream &Str = Func->getContext()->getStrDump(); | 430 Ostream &Str = Func->getContext()->getStrDump(); |
434 if (!Func->getContext()->isVerbose(IceV_Deleted) && | 431 if (!Func->getContext()->isVerbose(IceV_Deleted) && |
435 (isDeleted() || isRedundantAssign())) | 432 (isDeleted() || isRedundantAssign())) |
436 return; | 433 return; |
437 if (Func->getContext()->isVerbose(IceV_InstNumbers)) { | 434 if (Func->getContext()->isVerbose(IceV_InstNumbers)) { |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 dumpSources(Func); | 741 dumpSources(Func); |
745 } | 742 } |
746 | 743 |
747 void InstTarget::dump(const Cfg *Func) const { | 744 void InstTarget::dump(const Cfg *Func) const { |
748 Ostream &Str = Func->getContext()->getStrDump(); | 745 Ostream &Str = Func->getContext()->getStrDump(); |
749 Str << "[TARGET] "; | 746 Str << "[TARGET] "; |
750 Inst::dump(Func); | 747 Inst::dump(Func); |
751 } | 748 } |
752 | 749 |
753 } // end of namespace Ice | 750 } // end of namespace Ice |
OLD | NEW |