Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: src/IceGlobalContext.cpp

Issue 2165493002: Subzero: Fixed deadlock with _start but no globals (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698