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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 // ensure that at least this' member variables are initialized. | 263 // ensure that at least this' member variables are initialized. |
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 |
| 274 TargetLowering::staticInit(Flags.getTargetArch()); |
273 } | 275 } |
274 | 276 |
275 void GlobalContext::translateFunctions() { | 277 void GlobalContext::translateFunctions() { |
276 while (std::unique_ptr<Cfg> Func = optQueueBlockingPop()) { | 278 while (std::unique_ptr<Cfg> Func = optQueueBlockingPop()) { |
277 // Install Func in TLS for Cfg-specific container allocators. | 279 // Install Func in TLS for Cfg-specific container allocators. |
278 Cfg::setCurrentCfg(Func.get()); | 280 Cfg::setCurrentCfg(Func.get()); |
279 // Reset per-function stats being accumulated in TLS. | 281 // Reset per-function stats being accumulated in TLS. |
280 resetStats(); | 282 resetStats(); |
281 // Set verbose level to none if the current function does NOT | 283 // Set verbose level to none if the current function does NOT |
282 // match the -verbose-focus command-line option. | 284 // match the -verbose-focus command-line option. |
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1005 Ctx = Func->getContext(); | 1007 Ctx = Func->getContext(); |
1006 Active = | 1008 Active = |
1007 Func->getFocusedTiming() || Ctx->getFlags().getSubzeroTimingEnabled(); | 1009 Func->getFocusedTiming() || Ctx->getFlags().getSubzeroTimingEnabled(); |
1008 if (Active) | 1010 if (Active) |
1009 Ctx->pushTimer(ID, StackID); | 1011 Ctx->pushTimer(ID, StackID); |
1010 } | 1012 } |
1011 | 1013 |
1012 ICE_TLS_DEFINE_FIELD(GlobalContext::ThreadContext *, GlobalContext, TLS); | 1014 ICE_TLS_DEFINE_FIELD(GlobalContext::ThreadContext *, GlobalContext, TLS); |
1013 | 1015 |
1014 } // end of namespace Ice | 1016 } // end of namespace Ice |
OLD | NEW |