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

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: Add a comment Created 6 years, 2 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
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 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 for (InstPhi *Phi : Phis) { 494 for (InstPhi *Phi : Phis) {
495 if (Phi->isDeleted()) 495 if (Phi->isDeleted())
496 continue; 496 continue;
497 // Emitting a Phi instruction should cause an error. 497 // Emitting a Phi instruction should cause an error.
498 Inst *Instr = Phi; 498 Inst *Instr = Phi;
499 Instr->emit(Func); 499 Instr->emit(Func);
500 } 500 }
501 for (Inst *I : Insts) { 501 for (Inst *I : Insts) {
502 if (I->isDeleted()) 502 if (I->isDeleted())
503 continue; 503 continue;
504 // Here we detect redundant assignments like "mov eax, eax" and
505 // suppress them.
506 if (I->isRedundantAssign())
507 continue;
508 if (Func->UseIntegratedAssembler()) { 504 if (Func->UseIntegratedAssembler()) {
509 I->emitIAS(Func); 505 I->emitIAS(Func);
510 } else { 506 } else {
511 I->emit(Func); 507 I->emit(Func);
512 } 508 }
513 // Update emitted instruction count, plus fill/spill count for 509 // Update emitted instruction count, plus fill/spill count for
514 // Variable operands without a physical register. 510 // Variable operands without a physical register.
515 if (uint32_t Count = I->getEmitInstCount()) { 511 if (uint32_t Count = I->getEmitInstCount()) {
516 Func->getContext()->statsUpdateEmitted(Count); 512 Func->getContext()->statsUpdateEmitted(Count);
517 if (Variable *Dest = I->getDest()) { 513 if (Variable *Dest = I->getDest()) {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 if (!First) 594 if (!First)
599 Str << ", "; 595 Str << ", ";
600 First = false; 596 First = false;
601 Str << "%" << I->getName(); 597 Str << "%" << I->getName();
602 } 598 }
603 Str << "\n"; 599 Str << "\n";
604 } 600 }
605 } 601 }
606 602
607 } // end of namespace Ice 603 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceCfgNode.h ('k') | src/IceClFlags.h » ('j') | src/IceTargetLowering.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698