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