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

Side by Side Diff: src/IceCfgNode.cpp

Issue 605123002: Subzero: Use 'override' as appropriate for C++11. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Insert InstHighLevel into the Inst hierarchy 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
« no previous file with comments | « no previous file | src/IceInst.h » ('j') | src/IceInst.h » ('J')
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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 // ======================== Dump routines ======================== // 463 // ======================== Dump routines ======================== //
464 464
465 void CfgNode::emit(Cfg *Func) const { 465 void CfgNode::emit(Cfg *Func) const {
466 Func->setCurrentNode(this); 466 Func->setCurrentNode(this);
467 Ostream &Str = Func->getContext()->getStrEmit(); 467 Ostream &Str = Func->getContext()->getStrEmit();
468 if (Func->getEntryNode() == this) { 468 if (Func->getEntryNode() == this) {
469 Str << Func->getContext()->mangleName(Func->getFunctionName()) << ":\n"; 469 Str << Func->getContext()->mangleName(Func->getFunctionName()) << ":\n";
470 } 470 }
471 Str << getAsmName() << ":\n"; 471 Str << getAsmName() << ":\n";
472 for (PhiList::const_iterator I = Phis.begin(), E = Phis.end(); I != E; ++I) { 472 for (PhiList::const_iterator I = Phis.begin(), E = Phis.end(); I != E; ++I) {
473 InstPhi *Inst = *I; 473 InstPhi *Phi = *I;
474 if (Inst->isDeleted()) 474 if (Phi->isDeleted())
475 continue; 475 continue;
476 // Emitting a Phi instruction should cause an error. 476 // Emitting a Phi instruction should cause an error.
477 Inst->emit(Func); 477 Inst *Instr = Phi;
478 Instr->emit(Func);
478 } 479 }
479 for (InstList::const_iterator I = Insts.begin(), E = Insts.end(); I != E; 480 for (InstList::const_iterator I = Insts.begin(), E = Insts.end(); I != E;
480 ++I) { 481 ++I) {
481 Inst *Inst = *I; 482 Inst *Inst = *I;
482 if (Inst->isDeleted()) 483 if (Inst->isDeleted())
483 continue; 484 continue;
484 // Here we detect redundant assignments like "mov eax, eax" and 485 // Here we detect redundant assignments like "mov eax, eax" and
485 // suppress them. 486 // suppress them.
486 if (Inst->isRedundantAssign()) 487 if (Inst->isRedundantAssign())
487 continue; 488 continue;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 I != E; ++I) { 573 I != E; ++I) {
573 if (I != OutEdges.begin()) 574 if (I != OutEdges.begin())
574 Str << ", "; 575 Str << ", ";
575 Str << "%" << (*I)->getName(); 576 Str << "%" << (*I)->getName();
576 } 577 }
577 Str << "\n"; 578 Str << "\n";
578 } 579 }
579 } 580 }
580 581
581 } // end of namespace Ice 582 } // end of namespace Ice
OLDNEW
« no previous file with comments | « no previous file | src/IceInst.h » ('j') | src/IceInst.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698