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

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: more cleanup 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
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 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 } 488 }
489 for (InstList::const_iterator I = Insts.begin(), E = Insts.end(); I != E; 489 for (InstList::const_iterator I = Insts.begin(), E = Insts.end(); I != E;
490 ++I) { 490 ++I) {
491 Inst *Inst = *I; 491 Inst *Inst = *I;
492 if (Inst->isDeleted()) 492 if (Inst->isDeleted())
493 continue; 493 continue;
494 // Here we detect redundant assignments like "mov eax, eax" and 494 // Here we detect redundant assignments like "mov eax, eax" and
495 // suppress them. 495 // suppress them.
496 if (Inst->isRedundantAssign()) 496 if (Inst->isRedundantAssign())
497 continue; 497 continue;
498 (*I)->emit(Func); 498 if (Func->UseIntegratedAssembler()) {
499 (*I)->emitIAS(Func);
500 } else {
501 (*I)->emit(Func);
502 }
499 // Update emitted instruction count, plus fill/spill count for 503 // Update emitted instruction count, plus fill/spill count for
500 // Variable operands without a physical register. 504 // Variable operands without a physical register.
501 if (uint32_t Count = (*I)->getEmitInstCount()) { 505 if (uint32_t Count = (*I)->getEmitInstCount()) {
502 Func->getContext()->statsUpdateEmitted(Count); 506 Func->getContext()->statsUpdateEmitted(Count);
503 if (Variable *Dest = (*I)->getDest()) { 507 if (Variable *Dest = (*I)->getDest()) {
504 if (!Dest->hasReg()) 508 if (!Dest->hasReg())
505 Func->getContext()->statsUpdateFills(); 509 Func->getContext()->statsUpdateFills();
506 } 510 }
507 for (SizeT S = 0; S < (*I)->getSrcSize(); ++S) { 511 for (SizeT S = 0; S < (*I)->getSrcSize(); ++S) {
508 if (Variable *Src = llvm::dyn_cast<Variable>((*I)->getSrc(S))) { 512 if (Variable *Src = llvm::dyn_cast<Variable>((*I)->getSrc(S))) {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 I != E; ++I) { 582 I != E; ++I) {
579 if (I != OutEdges.begin()) 583 if (I != OutEdges.begin())
580 Str << ", "; 584 Str << ", ";
581 Str << "%" << (*I)->getName(); 585 Str << "%" << (*I)->getName();
582 } 586 }
583 Str << "\n"; 587 Str << "\n";
584 } 588 }
585 } 589 }
586 590
587 } // end of namespace Ice 591 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceClFlags.h » ('j') | src/IceInstX8632.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698