OLD | NEW |
1 //===- subzero/src/IceGlobalContext.cpp - Global context defs -------------===// | 1 //===- subzero/src/IceGlobalContext.cpp - Global context defs -------------===// |
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 /// \file | 10 /// \file |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 ProfileBlockInfoVarDecl->setIsConstant(true); | 300 ProfileBlockInfoVarDecl->setIsConstant(true); |
301 | 301 |
302 // Note: if you change this symbol, make sure to update | 302 // Note: if you change this symbol, make sure to update |
303 // runtime/szrt_profiler.c as well. | 303 // runtime/szrt_profiler.c as well. |
304 ProfileBlockInfoVarDecl->setName("__Sz_block_profile_info"); | 304 ProfileBlockInfoVarDecl->setName("__Sz_block_profile_info"); |
305 | 305 |
306 TargetLowering::staticInit(this); | 306 TargetLowering::staticInit(this); |
307 } | 307 } |
308 | 308 |
309 void GlobalContext::translateFunctions() { | 309 void GlobalContext::translateFunctions() { |
| 310 TimerMarker Timer(TimerStack::TT_translateFunctions, this); |
310 while (std::unique_ptr<Cfg> Func = optQueueBlockingPop()) { | 311 while (std::unique_ptr<Cfg> Func = optQueueBlockingPop()) { |
311 // Install Func in TLS for Cfg-specific container allocators. | 312 // Install Func in TLS for Cfg-specific container allocators. |
312 CfgLocalAllocatorScope _(Func.get()); | 313 CfgLocalAllocatorScope _(Func.get()); |
313 // Reset per-function stats being accumulated in TLS. | 314 // Reset per-function stats being accumulated in TLS. |
314 resetStats(); | 315 resetStats(); |
315 // Set verbose level to none if the current function does NOT | 316 // Set verbose level to none if the current function does NOT |
316 // match the -verbose-focus command-line option. | 317 // match the -verbose-focus command-line option. |
317 if (!matchSymbolName(Func->getFunctionName(), | 318 if (!matchSymbolName(Func->getFunctionName(), |
318 getFlags().getVerboseFocusOn())) | 319 getFlags().getVerboseFocusOn())) |
319 Func->setVerbose(IceV_None); | 320 Func->setVerbose(IceV_None); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 | 374 |
374 // Ensure Pending is large enough that Pending[Index] is valid. | 375 // Ensure Pending is large enough that Pending[Index] is valid. |
375 void resizePending(std::vector<EmitterWorkItem *> &Pending, uint32_t Index) { | 376 void resizePending(std::vector<EmitterWorkItem *> &Pending, uint32_t Index) { |
376 if (Index >= Pending.size()) | 377 if (Index >= Pending.size()) |
377 Pending.resize(Index + 1); | 378 Pending.resize(Index + 1); |
378 } | 379 } |
379 | 380 |
380 } // end of anonymous namespace | 381 } // end of anonymous namespace |
381 | 382 |
382 void GlobalContext::emitFileHeader() { | 383 void GlobalContext::emitFileHeader() { |
383 TimerMarker T1(Ice::TimerStack::TT_emit, this); | 384 TimerMarker T1(Ice::TimerStack::TT_emitAsm, this); |
384 if (getFlags().getOutFileType() == FT_Elf) { | 385 if (getFlags().getOutFileType() == FT_Elf) { |
385 getObjectWriter()->writeInitialELFHeader(); | 386 getObjectWriter()->writeInitialELFHeader(); |
386 } else { | 387 } else { |
387 if (!BuildDefs::dump()) { | 388 if (!BuildDefs::dump()) { |
388 getStrError() << "emitFileHeader for non-ELF"; | 389 getStrError() << "emitFileHeader for non-ELF"; |
389 getErrorStatus()->assign(EC_Translation); | 390 getErrorStatus()->assign(EC_Translation); |
390 } | 391 } |
391 TargetHeaderLowering::createLowering(this)->lower(); | 392 TargetHeaderLowering::createLowering(this)->lower(); |
392 } | 393 } |
393 } | 394 } |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
913 Ctx = Func->getContext(); | 914 Ctx = Func->getContext(); |
914 Active = | 915 Active = |
915 Func->getFocusedTiming() || Ctx->getFlags().getSubzeroTimingEnabled(); | 916 Func->getFocusedTiming() || Ctx->getFlags().getSubzeroTimingEnabled(); |
916 if (Active) | 917 if (Active) |
917 Ctx->pushTimer(ID, StackID); | 918 Ctx->pushTimer(ID, StackID); |
918 } | 919 } |
919 | 920 |
920 ICE_TLS_DEFINE_FIELD(GlobalContext::ThreadContext *, GlobalContext, TLS); | 921 ICE_TLS_DEFINE_FIELD(GlobalContext::ThreadContext *, GlobalContext, TLS); |
921 | 922 |
922 } // end of namespace Ice | 923 } // end of namespace Ice |
OLD | NEW |