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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 // Note: if you change this symbol, make sure to update | 303 // Note: if you change this symbol, make sure to update |
304 // runtime/szrt_profiler.c as well. | 304 // runtime/szrt_profiler.c as well. |
305 ProfileBlockInfoVarDecl->setName("__Sz_block_profile_info"); | 305 ProfileBlockInfoVarDecl->setName("__Sz_block_profile_info"); |
306 ProfileBlockInfoVarDecl->setSuppressMangling(); | 306 ProfileBlockInfoVarDecl->setSuppressMangling(); |
307 ProfileBlockInfoVarDecl->setLinkage(llvm::GlobalValue::ExternalLinkage); | 307 ProfileBlockInfoVarDecl->setLinkage(llvm::GlobalValue::ExternalLinkage); |
308 | 308 |
309 TargetLowering::staticInit(this); | 309 TargetLowering::staticInit(this); |
310 } | 310 } |
311 | 311 |
312 void GlobalContext::translateFunctions() { | 312 void GlobalContext::translateFunctions() { |
| 313 TimerMarker Timer(TimerStack::TT_translateFunctions, this); |
313 while (std::unique_ptr<Cfg> Func = optQueueBlockingPop()) { | 314 while (std::unique_ptr<Cfg> Func = optQueueBlockingPop()) { |
314 // Install Func in TLS for Cfg-specific container allocators. | 315 // Install Func in TLS for Cfg-specific container allocators. |
315 CfgLocalAllocatorScope _(Func.get()); | 316 CfgLocalAllocatorScope _(Func.get()); |
316 // Reset per-function stats being accumulated in TLS. | 317 // Reset per-function stats being accumulated in TLS. |
317 resetStats(); | 318 resetStats(); |
318 // Set verbose level to none if the current function does NOT | 319 // Set verbose level to none if the current function does NOT |
319 // match the -verbose-focus command-line option. | 320 // match the -verbose-focus command-line option. |
320 if (!matchSymbolName(Func->getFunctionName(), | 321 if (!matchSymbolName(Func->getFunctionName(), |
321 getFlags().getVerboseFocusOn())) | 322 getFlags().getVerboseFocusOn())) |
322 Func->setVerbose(IceV_None); | 323 Func->setVerbose(IceV_None); |
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1080 Ctx = Func->getContext(); | 1081 Ctx = Func->getContext(); |
1081 Active = | 1082 Active = |
1082 Func->getFocusedTiming() || Ctx->getFlags().getSubzeroTimingEnabled(); | 1083 Func->getFocusedTiming() || Ctx->getFlags().getSubzeroTimingEnabled(); |
1083 if (Active) | 1084 if (Active) |
1084 Ctx->pushTimer(ID, StackID); | 1085 Ctx->pushTimer(ID, StackID); |
1085 } | 1086 } |
1086 | 1087 |
1087 ICE_TLS_DEFINE_FIELD(GlobalContext::ThreadContext *, GlobalContext, TLS); | 1088 ICE_TLS_DEFINE_FIELD(GlobalContext::ThreadContext *, GlobalContext, TLS); |
1088 | 1089 |
1089 } // end of namespace Ice | 1090 } // end of namespace Ice |
OLD | NEW |