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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 BaseOS << "Unsupported constant type: " << Ty; | 369 BaseOS << "Unsupported constant type: " << Ty; |
370 llvm_unreachable(BaseOS.str().c_str()); | 370 llvm_unreachable(BaseOS.str().c_str()); |
371 } break; | 371 } break; |
372 case IceType_void: | 372 case IceType_void: |
373 case IceType_NUM: | 373 case IceType_NUM: |
374 break; | 374 break; |
375 } | 375 } |
376 llvm_unreachable("Unknown type"); | 376 llvm_unreachable("Unknown type"); |
377 } | 377 } |
378 | 378 |
| 379 void GlobalContext::dumpStats(const IceString &Name) { |
| 380 if (Flags.DumpStats) { |
| 381 StatsFunction.dump(Name, getStrDump()); |
| 382 StatsCumulative.dump("_TOTAL_", getStrDump()); |
| 383 } |
| 384 } |
| 385 |
379 void Timer::printElapsedUs(GlobalContext *Ctx, const IceString &Tag) const { | 386 void Timer::printElapsedUs(GlobalContext *Ctx, const IceString &Tag) const { |
380 if (Ctx->isVerbose(IceV_Timing)) { | 387 if (Ctx->isVerbose(IceV_Timing)) { |
381 // Prefixing with '#' allows timing strings to be included | 388 // Prefixing with '#' allows timing strings to be included |
382 // without error in textual assembly output. | 389 // without error in textual assembly output. |
383 Ctx->getStrDump() << "# " << getElapsedUs() << " usec " << Tag << "\n"; | 390 Ctx->getStrDump() << "# " << getElapsedUs() << " usec " << Tag << "\n"; |
384 } | 391 } |
385 } | 392 } |
386 | 393 |
387 } // end of namespace Ice | 394 } // end of namespace Ice |
OLD | NEW |