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

Side by Side Diff: src/IceCfgNode.cpp

Issue 620373004: Subzero: Add a few performance measurement tools. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Improve the use of containers 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 | « 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 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 Ostream &Str = Func->getContext()->getStrDump(); 488 Ostream &Str = Func->getContext()->getStrDump();
489 Liveness *Liveness = Func->getLiveness(); 489 Liveness *Liveness = Func->getLiveness();
490 if (Func->getContext()->isVerbose(IceV_Instructions)) { 490 if (Func->getContext()->isVerbose(IceV_Instructions)) {
491 Str << getName() << ":\n"; 491 Str << getName() << ":\n";
492 } 492 }
493 // Dump list of predecessor nodes. 493 // Dump list of predecessor nodes.
494 if (Func->getContext()->isVerbose(IceV_Preds) && !InEdges.empty()) { 494 if (Func->getContext()->isVerbose(IceV_Preds) && !InEdges.empty()) {
495 Str << " // preds = "; 495 Str << " // preds = ";
496 bool First = true; 496 bool First = true;
497 for (CfgNode *I : InEdges) { 497 for (CfgNode *I : InEdges) {
498 if (First) 498 if (!First)
499 Str << ", "; 499 Str << ", ";
500 First = false; 500 First = false;
501 Str << "%" << I->getName(); 501 Str << "%" << I->getName();
502 } 502 }
503 Str << "\n"; 503 Str << "\n";
504 } 504 }
505 // Dump the live-in variables. 505 // Dump the live-in variables.
506 llvm::BitVector LiveIn; 506 llvm::BitVector LiveIn;
507 if (Liveness) 507 if (Liveness)
508 LiveIn = Liveness->getLiveIn(this); 508 LiveIn = Liveness->getLiveIn(this);
(...skipping 24 matching lines...) Expand all
533 Str << " %" << Liveness->getVariable(i, this)->getName(); 533 Str << " %" << Liveness->getVariable(i, this)->getName();
534 } 534 }
535 } 535 }
536 Str << "\n"; 536 Str << "\n";
537 } 537 }
538 // Dump list of successor nodes. 538 // Dump list of successor nodes.
539 if (Func->getContext()->isVerbose(IceV_Succs)) { 539 if (Func->getContext()->isVerbose(IceV_Succs)) {
540 Str << " // succs = "; 540 Str << " // succs = ";
541 bool First = true; 541 bool First = true;
542 for (CfgNode *I : OutEdges) { 542 for (CfgNode *I : OutEdges) {
543 if (First) 543 if (!First)
544 Str << ", "; 544 Str << ", ";
545 First = false; 545 First = false;
546 Str << "%" << I->getName(); 546 Str << "%" << I->getName();
547 } 547 }
548 Str << "\n"; 548 Str << "\n";
549 } 549 }
550 } 550 }
551 551
552 } // end of namespace Ice 552 } // 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