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

Side by Side Diff: src/IceCfgNode.cpp

Issue 681783002: Subzero: Refactor newline emission for Inst::emit(). (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 1 month 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 | « no previous file | src/IceInst.cpp » ('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/IceCfgNode.cpp - Basic block (node) implementation -----===// 1 //===- subzero/src/IceCfgNode.cpp - Basic block (node) 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 CfgNode class, including the complexities 10 // This file implements the CfgNode class, including the complexities
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 Inst *Instr = Phi; 503 Inst *Instr = Phi;
504 Instr->emit(Func); 504 Instr->emit(Func);
505 } 505 }
506 for (Inst *I : Insts) { 506 for (Inst *I : Insts) {
507 if (I->isDeleted()) 507 if (I->isDeleted())
508 continue; 508 continue;
509 if (Func->useIntegratedAssembler()) { 509 if (Func->useIntegratedAssembler()) {
510 I->emitIAS(Func); 510 I->emitIAS(Func);
511 } else { 511 } else {
512 I->emit(Func); 512 I->emit(Func);
513 Str << "\n";
513 } 514 }
514 // Update emitted instruction count, plus fill/spill count for 515 // Update emitted instruction count, plus fill/spill count for
515 // Variable operands without a physical register. 516 // Variable operands without a physical register.
516 if (uint32_t Count = I->getEmitInstCount()) { 517 if (uint32_t Count = I->getEmitInstCount()) {
517 Func->getContext()->statsUpdateEmitted(Count); 518 Func->getContext()->statsUpdateEmitted(Count);
518 if (Variable *Dest = I->getDest()) { 519 if (Variable *Dest = I->getDest()) {
519 if (!Dest->hasReg()) 520 if (!Dest->hasReg())
520 Func->getContext()->statsUpdateFills(); 521 Func->getContext()->statsUpdateFills();
521 } 522 }
522 for (SizeT S = 0; S < I->getSrcSize(); ++S) { 523 for (SizeT S = 0; S < I->getSrcSize(); ++S) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 if (!First) 600 if (!First)
600 Str << ", "; 601 Str << ", ";
601 First = false; 602 First = false;
602 Str << "%" << I->getName(); 603 Str << "%" << I->getName();
603 } 604 }
604 Str << "\n"; 605 Str << "\n";
605 } 606 }
606 } 607 }
607 608
608 } // end of namespace Ice 609 } // end of namespace Ice
OLDNEW
« no previous file with comments | « no previous file | src/IceInst.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698