| 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 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 Str << ", align " << typeAlignInBytes(Ty); | 656 Str << ", align " << typeAlignInBytes(Ty); |
| 657 } | 657 } |
| 658 | 658 |
| 659 void InstSwitch::dump(const Cfg *Func) const { | 659 void InstSwitch::dump(const Cfg *Func) const { |
| 660 Ostream &Str = Func->getContext()->getStrDump(); | 660 Ostream &Str = Func->getContext()->getStrDump(); |
| 661 Type Ty = getComparison()->getType(); | 661 Type Ty = getComparison()->getType(); |
| 662 Str << "switch " << Ty << " "; | 662 Str << "switch " << Ty << " "; |
| 663 getSrc(0)->dump(Func); | 663 getSrc(0)->dump(Func); |
| 664 Str << ", label %" << getLabelDefault()->getName() << " [\n"; | 664 Str << ", label %" << getLabelDefault()->getName() << " [\n"; |
| 665 for (SizeT I = 0; I < getNumCases(); ++I) { | 665 for (SizeT I = 0; I < getNumCases(); ++I) { |
| 666 Str << " " << Ty << " " << getValue(I) << ", label %" | 666 Str << " " << Ty << " " << static_cast<int64_t>(getValue(I)) |
| 667 << getLabel(I)->getName() << "\n"; | 667 << ", label %" << getLabel(I)->getName() << "\n"; |
| 668 } | 668 } |
| 669 Str << " ]"; | 669 Str << " ]"; |
| 670 } | 670 } |
| 671 | 671 |
| 672 void InstPhi::dump(const Cfg *Func) const { | 672 void InstPhi::dump(const Cfg *Func) const { |
| 673 Ostream &Str = Func->getContext()->getStrDump(); | 673 Ostream &Str = Func->getContext()->getStrDump(); |
| 674 dumpDest(Func); | 674 dumpDest(Func); |
| 675 Str << " = phi " << getDest()->getType() << " "; | 675 Str << " = phi " << getDest()->getType() << " "; |
| 676 for (SizeT I = 0; I < getSrcSize(); ++I) { | 676 for (SizeT I = 0; I < getSrcSize(); ++I) { |
| 677 if (I > 0) | 677 if (I > 0) |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 | 761 |
| 762 void InstTarget::dump(const Cfg *Func) const { | 762 void InstTarget::dump(const Cfg *Func) const { |
| 763 Ostream &Str = Func->getContext()->getStrDump(); | 763 Ostream &Str = Func->getContext()->getStrDump(); |
| 764 Str << "[TARGET] "; | 764 Str << "[TARGET] "; |
| 765 Inst::dump(Func); | 765 Inst::dump(Func); |
| 766 } | 766 } |
| 767 | 767 |
| 768 void InstTarget::dumpExtras(const Cfg *Func) const { Inst::dumpExtras(Func); } | 768 void InstTarget::dumpExtras(const Cfg *Func) const { Inst::dumpExtras(Func); } |
| 769 | 769 |
| 770 } // end of namespace Ice | 770 } // end of namespace Ice |
| OLD | NEW |