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

Side by Side Diff: src/IceCfgNode.cpp

Issue 672393003: Subzero: Minor refactoring/additions in preparation for phi edge splitting. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Remove deprecated advanceBackward method 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 | « src/IceCfgNode.h ('k') | src/IceClFlags.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/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 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 for (InstPhi *Phi : Phis) { 499 for (InstPhi *Phi : Phis) {
500 if (Phi->isDeleted()) 500 if (Phi->isDeleted())
501 continue; 501 continue;
502 // Emitting a Phi instruction should cause an error. 502 // Emitting a Phi instruction should cause an error.
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 // Here we detect redundant assignments like "mov eax, eax" and
510 // suppress them.
511 if (I->isRedundantAssign())
512 continue;
513 if (Func->useIntegratedAssembler()) { 509 if (Func->useIntegratedAssembler()) {
514 I->emitIAS(Func); 510 I->emitIAS(Func);
515 } else { 511 } else {
516 I->emit(Func); 512 I->emit(Func);
517 } 513 }
518 // Update emitted instruction count, plus fill/spill count for 514 // Update emitted instruction count, plus fill/spill count for
519 // Variable operands without a physical register. 515 // Variable operands without a physical register.
520 if (uint32_t Count = I->getEmitInstCount()) { 516 if (uint32_t Count = I->getEmitInstCount()) {
521 Func->getContext()->statsUpdateEmitted(Count); 517 Func->getContext()->statsUpdateEmitted(Count);
522 if (Variable *Dest = I->getDest()) { 518 if (Variable *Dest = I->getDest()) {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 if (!First) 599 if (!First)
604 Str << ", "; 600 Str << ", ";
605 First = false; 601 First = false;
606 Str << "%" << I->getName(); 602 Str << "%" << I->getName();
607 } 603 }
608 Str << "\n"; 604 Str << "\n";
609 } 605 }
610 } 606 }
611 607
612 } // end of namespace Ice 608 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceCfgNode.h ('k') | src/IceClFlags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698