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 548 matching lines...) Loading... |
559 dumpDest(Func); | 559 dumpDest(Func); |
560 Str << "br "; | 560 Str << "br "; |
561 if (!isUnconditional()) { | 561 if (!isUnconditional()) { |
562 Str << "i1 "; | 562 Str << "i1 "; |
563 getCondition()->dump(Func); | 563 getCondition()->dump(Func); |
564 Str << ", label %" << getTargetTrue()->getName() << ", "; | 564 Str << ", label %" << getTargetTrue()->getName() << ", "; |
565 } | 565 } |
566 Str << "label %" << getTargetFalse()->getName(); | 566 Str << "label %" << getTargetFalse()->getName(); |
567 } | 567 } |
568 | 568 |
| 569 Type InstCall::getReturnType() const { |
| 570 if (Dest == NULL) |
| 571 return IceType_void; |
| 572 return Dest->getType(); |
| 573 } |
| 574 |
569 void InstCall::dump(const Cfg *Func) const { | 575 void InstCall::dump(const Cfg *Func) const { |
570 Ostream &Str = Func->getContext()->getStrDump(); | 576 Ostream &Str = Func->getContext()->getStrDump(); |
571 if (getDest()) { | 577 if (getDest()) { |
572 dumpDest(Func); | 578 dumpDest(Func); |
573 Str << " = "; | 579 Str << " = "; |
574 } | 580 } |
575 Str << "call "; | 581 Str << "call "; |
576 if (getDest()) | 582 if (getDest()) |
577 Str << getDest()->getType(); | 583 Str << getDest()->getType(); |
578 else | 584 else |
(...skipping 184 matching lines...) Loading... |
763 | 769 |
764 void InstTarget::dump(const Cfg *Func) const { | 770 void InstTarget::dump(const Cfg *Func) const { |
765 Ostream &Str = Func->getContext()->getStrDump(); | 771 Ostream &Str = Func->getContext()->getStrDump(); |
766 Str << "[TARGET] "; | 772 Str << "[TARGET] "; |
767 Inst::dump(Func); | 773 Inst::dump(Func); |
768 } | 774 } |
769 | 775 |
770 void InstTarget::dumpExtras(const Cfg *Func) const { Inst::dumpExtras(Func); } | 776 void InstTarget::dumpExtras(const Cfg *Func) const { Inst::dumpExtras(Func); } |
771 | 777 |
772 } // end of namespace Ice | 778 } // end of namespace Ice |
OLD | NEW |