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

Side by Side Diff: src/IceInst.cpp

Issue 577353003: Add call instructions to Subzero's bitcode reader. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix remaining issues raised. Created 6 years, 3 months 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/IceIntrinsics.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/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...) Expand 10 before | Expand all | Expand 10 after
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...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « src/IceInst.h ('k') | src/IceIntrinsics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698