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

Side by Side Diff: src/IceCfgNode.cpp

Issue 574133002: Add initial integrated assembler w/ some Xmm ops. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: remove duplicate pxor, and use enum 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/IceCfg.cpp ('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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 } 485 }
486 for (InstList::const_iterator I = Insts.begin(), E = Insts.end(); I != E; 486 for (InstList::const_iterator I = Insts.begin(), E = Insts.end(); I != E;
487 ++I) { 487 ++I) {
488 Inst *Inst = *I; 488 Inst *Inst = *I;
489 if (Inst->isDeleted()) 489 if (Inst->isDeleted())
490 continue; 490 continue;
491 // Here we detect redundant assignments like "mov eax, eax" and 491 // Here we detect redundant assignments like "mov eax, eax" and
492 // suppress them. 492 // suppress them.
493 if (Inst->isRedundantAssign()) 493 if (Inst->isRedundantAssign())
494 continue; 494 continue;
495 (*I)->emit(Func); 495 if (Func->UseIntegratedAssembler()) {
496 (*I)->emitIAS(Func);
497 } else {
498 (*I)->emit(Func);
499 }
496 // Update emitted instruction count, plus fill/spill count for 500 // Update emitted instruction count, plus fill/spill count for
497 // Variable operands without a physical register. 501 // Variable operands without a physical register.
498 if (uint32_t Count = (*I)->getEmitInstCount()) { 502 if (uint32_t Count = (*I)->getEmitInstCount()) {
499 Func->getContext()->statsUpdateEmitted(Count); 503 Func->getContext()->statsUpdateEmitted(Count);
500 if (Variable *Dest = (*I)->getDest()) { 504 if (Variable *Dest = (*I)->getDest()) {
501 if (!Dest->hasReg()) 505 if (!Dest->hasReg())
502 Func->getContext()->statsUpdateFills(); 506 Func->getContext()->statsUpdateFills();
503 } 507 }
504 for (SizeT S = 0; S < (*I)->getSrcSize(); ++S) { 508 for (SizeT S = 0; S < (*I)->getSrcSize(); ++S) {
505 if (Variable *Src = llvm::dyn_cast<Variable>((*I)->getSrc(S))) { 509 if (Variable *Src = llvm::dyn_cast<Variable>((*I)->getSrc(S))) {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 I != E; ++I) { 579 I != E; ++I) {
576 if (I != OutEdges.begin()) 580 if (I != OutEdges.begin())
577 Str << ", "; 581 Str << ", ";
578 Str << "%" << (*I)->getName(); 582 Str << "%" << (*I)->getName();
579 } 583 }
580 Str << "\n"; 584 Str << "\n";
581 } 585 }
582 } 586 }
583 587
584 } // end of namespace Ice 588 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceClFlags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698