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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 ProfileBlockInfoVarDecl = VariableDeclaration::create(this); | 264 ProfileBlockInfoVarDecl = VariableDeclaration::create(this); |
265 ProfileBlockInfoVarDecl->setAlignment(typeWidthInBytes(IceType_i64)); | 265 ProfileBlockInfoVarDecl->setAlignment(typeWidthInBytes(IceType_i64)); |
266 ProfileBlockInfoVarDecl->setIsConstant(true); | 266 ProfileBlockInfoVarDecl->setIsConstant(true); |
267 | 267 |
268 // Note: if you change this symbol, make sure to update | 268 // Note: if you change this symbol, make sure to update |
269 // runtime/szrt_profiler.c as well. | 269 // runtime/szrt_profiler.c as well. |
270 ProfileBlockInfoVarDecl->setName("__Sz_block_profile_info"); | 270 ProfileBlockInfoVarDecl->setName("__Sz_block_profile_info"); |
271 ProfileBlockInfoVarDecl->setSuppressMangling(); | 271 ProfileBlockInfoVarDecl->setSuppressMangling(); |
272 ProfileBlockInfoVarDecl->setLinkage(llvm::GlobalValue::ExternalLinkage); | 272 ProfileBlockInfoVarDecl->setLinkage(llvm::GlobalValue::ExternalLinkage); |
273 | 273 |
274 TargetLowering::staticInit(Flags.getTargetArch()); | 274 TargetLowering::staticInit(Flags); |
275 } | 275 } |
276 | 276 |
277 void GlobalContext::translateFunctions() { | 277 void GlobalContext::translateFunctions() { |
278 while (std::unique_ptr<Cfg> Func = optQueueBlockingPop()) { | 278 while (std::unique_ptr<Cfg> Func = optQueueBlockingPop()) { |
279 // Install Func in TLS for Cfg-specific container allocators. | 279 // Install Func in TLS for Cfg-specific container allocators. |
280 Cfg::setCurrentCfg(Func.get()); | 280 Cfg::setCurrentCfg(Func.get()); |
281 // Reset per-function stats being accumulated in TLS. | 281 // Reset per-function stats being accumulated in TLS. |
282 resetStats(); | 282 resetStats(); |
283 // Set verbose level to none if the current function does NOT | 283 // Set verbose level to none if the current function does NOT |
284 // match the -verbose-focus command-line option. | 284 // match the -verbose-focus command-line option. |
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1009 Ctx = Func->getContext(); | 1009 Ctx = Func->getContext(); |
1010 Active = | 1010 Active = |
1011 Func->getFocusedTiming() || Ctx->getFlags().getSubzeroTimingEnabled(); | 1011 Func->getFocusedTiming() || Ctx->getFlags().getSubzeroTimingEnabled(); |
1012 if (Active) | 1012 if (Active) |
1013 Ctx->pushTimer(ID, StackID); | 1013 Ctx->pushTimer(ID, StackID); |
1014 } | 1014 } |
1015 | 1015 |
1016 ICE_TLS_DEFINE_FIELD(GlobalContext::ThreadContext *, GlobalContext, TLS); | 1016 ICE_TLS_DEFINE_FIELD(GlobalContext::ThreadContext *, GlobalContext, TLS); |
1017 | 1017 |
1018 } // end of namespace Ice | 1018 } // end of namespace Ice |
OLD | NEW |