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

Side by Side Diff: src/IceGlobalContext.cpp

Issue 580903005: Subzero: Add branch optimization. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes 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/IceGlobalContext.h ('k') | src/IceInstX8632.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/IceGlobalContext.cpp - Global context defs ---*- C++ -*-===// 1 //===- subzero/src/IceGlobalContext.cpp - Global context defs ---*- C++ -*-===//
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 defines aspects of the compilation that persist across 10 // This file defines aspects of the compilation that persist across
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 BaseOS << "Unsupported constant type: " << Ty; 377 BaseOS << "Unsupported constant type: " << Ty;
378 llvm_unreachable(BaseOS.str().c_str()); 378 llvm_unreachable(BaseOS.str().c_str());
379 } break; 379 } break;
380 case IceType_void: 380 case IceType_void:
381 case IceType_NUM: 381 case IceType_NUM:
382 break; 382 break;
383 } 383 }
384 llvm_unreachable("Unknown type"); 384 llvm_unreachable("Unknown type");
385 } 385 }
386 386
387 void GlobalContext::dumpStats(const IceString &Name) { 387 void GlobalContext::dumpStats(const IceString &Name, bool Final) {
388 if (Flags.DumpStats) { 388 if (Flags.DumpStats) {
389 StatsFunction.dump(Name, getStrDump()); 389 if (Final) {
390 StatsCumulative.dump("_TOTAL_", getStrDump()); 390 StatsCumulative.dump(Name, getStrDump());
391 } else {
392 StatsFunction.dump(Name, getStrDump());
393 StatsCumulative.dump("_TOTAL_", getStrDump());
394 }
391 } 395 }
392 } 396 }
393 397
394 void Timer::printElapsedUs(GlobalContext *Ctx, const IceString &Tag) const { 398 void Timer::printElapsedUs(GlobalContext *Ctx, const IceString &Tag) const {
395 if (Ctx->isVerbose(IceV_Timing)) { 399 if (Ctx->isVerbose(IceV_Timing)) {
396 // Prefixing with '#' allows timing strings to be included 400 // Prefixing with '#' allows timing strings to be included
397 // without error in textual assembly output. 401 // without error in textual assembly output.
398 Ctx->getStrDump() << "# " << getElapsedUs() << " usec " << Tag << "\n"; 402 Ctx->getStrDump() << "# " << getElapsedUs() << " usec " << Tag << "\n";
399 } 403 }
400 } 404 }
401 405
402 } // end of namespace Ice 406 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceGlobalContext.h ('k') | src/IceInstX8632.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698