OLD | NEW |
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 Loading... |
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 |
OLD | NEW |