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

Side by Side Diff: src/IceInst.cpp

Issue 539743002: Subzero: Render constants in dump() to be more like LLVM. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: 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/IceConverter.cpp ('k') | src/IceOperand.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 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « src/IceConverter.cpp ('k') | src/IceOperand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698