| 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 | 291 |
| 292 namespace { | 292 namespace { |
| 293 | 293 |
| 294 // By default, wake up the main parser thread when the OptQ gets half empty. | 294 // By default, wake up the main parser thread when the OptQ gets half empty. |
| 295 static constexpr size_t DefaultOptQWakeupSize = GlobalContext::MaxOptQSize >> 1; | 295 static constexpr size_t DefaultOptQWakeupSize = GlobalContext::MaxOptQSize >> 1; |
| 296 | 296 |
| 297 } // end of anonymous namespace | 297 } // end of anonymous namespace |
| 298 | 298 |
| 299 GlobalContext::GlobalContext(Ostream *OsDump, Ostream *OsEmit, Ostream *OsError, | 299 GlobalContext::GlobalContext(Ostream *OsDump, Ostream *OsEmit, Ostream *OsError, |
| 300 ELFStreamer *ELFStr) | 300 ELFStreamer *ELFStr) |
| 301 : Strings(new StringPool()), ConstPool(new ConstantPool()), ErrorStatus(), | 301 : GlobalsReceived(false), Strings(new StringPool()), |
| 302 StrDump(OsDump), StrEmit(OsEmit), StrError(OsError), IntrinsicsInfo(this), | 302 ConstPool(new ConstantPool()), ErrorStatus(), StrDump(OsDump), |
| 303 ObjectWriter(), | 303 StrEmit(OsEmit), StrError(OsError), IntrinsicsInfo(this), ObjectWriter(), |
| 304 OptQWakeupSize(std::max(DefaultOptQWakeupSize, | 304 OptQWakeupSize(std::max(DefaultOptQWakeupSize, |
| 305 size_t(getFlags().getNumTranslationThreads()))), | 305 size_t(getFlags().getNumTranslationThreads()))), |
| 306 OptQ(/*Sequential=*/getFlags().isSequential(), | 306 OptQ(/*Sequential=*/getFlags().isSequential(), |
| 307 /*MaxSize=*/ | 307 /*MaxSize=*/ |
| 308 getFlags().isParseParallel() | 308 getFlags().isParseParallel() |
| 309 ? MaxOptQSize | 309 ? MaxOptQSize |
| 310 : getFlags().getNumTranslationThreads()), | 310 : getFlags().getNumTranslationThreads()), |
| 311 // EmitQ is allowed unlimited size. | 311 // EmitQ is allowed unlimited size. |
| 312 EmitQ(/*Sequential=*/getFlags().isSequential()), | 312 EmitQ(/*Sequential=*/getFlags().isSequential()), |
| 313 DataLowering(TargetDataLowering::createLowering(this)) { | 313 DataLowering(TargetDataLowering::createLowering(this)) { |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1041 void TimerMarker::pushCfg(const Cfg *Func) { | 1041 void TimerMarker::pushCfg(const Cfg *Func) { |
| 1042 Ctx = Func->getContext(); | 1042 Ctx = Func->getContext(); |
| 1043 Active = Func->getFocusedTiming() || getFlags().getSubzeroTimingEnabled(); | 1043 Active = Func->getFocusedTiming() || getFlags().getSubzeroTimingEnabled(); |
| 1044 if (Active) | 1044 if (Active) |
| 1045 Ctx->pushTimer(ID, StackID); | 1045 Ctx->pushTimer(ID, StackID); |
| 1046 } | 1046 } |
| 1047 | 1047 |
| 1048 ICE_TLS_DEFINE_FIELD(GlobalContext::ThreadContext *, GlobalContext, TLS); | 1048 ICE_TLS_DEFINE_FIELD(GlobalContext::ThreadContext *, GlobalContext, TLS); |
| 1049 | 1049 |
| 1050 } // end of namespace Ice | 1050 } // end of namespace Ice |
| OLD | NEW |