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

Side by Side Diff: src/IceCfgNode.cpp

Issue 476323004: Start adding an integrated assembler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: lit test to check encodings, swap complexi8 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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 } 428 }
429 for (InstList::const_iterator I = Insts.begin(), E = Insts.end(); I != E; 429 for (InstList::const_iterator I = Insts.begin(), E = Insts.end(); I != E;
430 ++I) { 430 ++I) {
431 Inst *Inst = *I; 431 Inst *Inst = *I;
432 if (Inst->isDeleted()) 432 if (Inst->isDeleted())
433 continue; 433 continue;
434 // Here we detect redundant assignments like "mov eax, eax" and 434 // Here we detect redundant assignments like "mov eax, eax" and
435 // suppress them. 435 // suppress them.
436 if (Inst->isRedundantAssign()) 436 if (Inst->isRedundantAssign())
437 continue; 437 continue;
438 (*I)->emit(Func); 438 if (Func->UseIntegratedAssembler()) {
439 (*I)->emitIAS(Func);
440 } else {
441 (*I)->emit(Func);
442 }
439 } 443 }
440 } 444 }
441 445
442 void CfgNode::dump(Cfg *Func) const { 446 void CfgNode::dump(Cfg *Func) const {
443 Func->setCurrentNode(this); 447 Func->setCurrentNode(this);
444 Ostream &Str = Func->getContext()->getStrDump(); 448 Ostream &Str = Func->getContext()->getStrDump();
445 Liveness *Liveness = Func->getLiveness(); 449 Liveness *Liveness = Func->getLiveness();
446 if (Func->getContext()->isVerbose(IceV_Instructions)) { 450 if (Func->getContext()->isVerbose(IceV_Instructions)) {
447 Str << getName() << ":\n"; 451 Str << getName() << ":\n";
448 } 452 }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 I != E; ++I) { 507 I != E; ++I) {
504 if (I != OutEdges.begin()) 508 if (I != OutEdges.begin())
505 Str << ", "; 509 Str << ", ";
506 Str << "%" << (*I)->getName(); 510 Str << "%" << (*I)->getName();
507 } 511 }
508 Str << "\n"; 512 Str << "\n";
509 } 513 }
510 } 514 }
511 515
512 } // end of namespace Ice 516 } // 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