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

Side by Side Diff: src/IceGlobalContext.cpp

Issue 1848873002: Force sequential parsing when threads=0. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 8 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 Str << "|Rel=" << Pool->Relocatables.size(); 275 Str << "|Rel=" << Pool->Relocatables.size();
276 Str << "|ExtRel=" << Pool->ExternRelocatables.size(); 276 Str << "|ExtRel=" << Pool->ExternRelocatables.size();
277 } 277 }
278 Str << "\n"; 278 Str << "\n";
279 } 279 }
280 280
281 GlobalContext::GlobalContext(Ostream *OsDump, Ostream *OsEmit, Ostream *OsError, 281 GlobalContext::GlobalContext(Ostream *OsDump, Ostream *OsEmit, Ostream *OsError,
282 ELFStreamer *ELFStr) 282 ELFStreamer *ELFStr)
283 : Strings(new StringPool()), ConstPool(new ConstantPool()), ErrorStatus(), 283 : Strings(new StringPool()), ConstPool(new ConstantPool()), ErrorStatus(),
284 StrDump(OsDump), StrEmit(OsEmit), StrError(OsError), IntrinsicsInfo(this), 284 StrDump(OsDump), StrEmit(OsEmit), StrError(OsError), IntrinsicsInfo(this),
285 ObjectWriter(), OptQ(/*Sequential=*/Flags.isSequential(), 285 ObjectWriter(),
286 /*MaxSize=*/ 286 OptQ(/*Sequential=*/Flags.isSequential(),
287 (Flags.getParseParallel() && Flags.getBuildOnRead()) 287 /*MaxSize=*/
288 ? MaxOptQSize 288 Flags.isParseParallel() ? MaxOptQSize
289 : Flags.getNumTranslationThreads()), 289 : Flags.getNumTranslationThreads()),
290 // EmitQ is allowed unlimited size. 290 // EmitQ is allowed unlimited size.
291 EmitQ(/*Sequential=*/Flags.isSequential()), 291 EmitQ(/*Sequential=*/Flags.isSequential()),
292 DataLowering(TargetDataLowering::createLowering(this)) { 292 DataLowering(TargetDataLowering::createLowering(this)) {
293 assert(OsDump && "OsDump is not defined for GlobalContext"); 293 assert(OsDump && "OsDump is not defined for GlobalContext");
294 assert(OsEmit && "OsEmit is not defined for GlobalContext"); 294 assert(OsEmit && "OsEmit is not defined for GlobalContext");
295 assert(OsError && "OsError is not defined for GlobalContext"); 295 assert(OsError && "OsError is not defined for GlobalContext");
296 // Make sure thread_local fields are properly initialized before any 296 // Make sure thread_local fields are properly initialized before any
297 // accesses are made. Do this here instead of at the start of 297 // accesses are made. Do this here instead of at the start of
298 // main() so that all clients (e.g. unit tests) can benefit for 298 // main() so that all clients (e.g. unit tests) can benefit for
299 // free. 299 // free.
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
998 Ctx = Func->getContext(); 998 Ctx = Func->getContext();
999 Active = 999 Active =
1000 Func->getFocusedTiming() || Ctx->getFlags().getSubzeroTimingEnabled(); 1000 Func->getFocusedTiming() || Ctx->getFlags().getSubzeroTimingEnabled();
1001 if (Active) 1001 if (Active)
1002 Ctx->pushTimer(ID, StackID); 1002 Ctx->pushTimer(ID, StackID);
1003 } 1003 }
1004 1004
1005 ICE_TLS_DEFINE_FIELD(GlobalContext::ThreadContext *, GlobalContext, TLS); 1005 ICE_TLS_DEFINE_FIELD(GlobalContext::ThreadContext *, GlobalContext, TLS);
1006 1006
1007 } // end of namespace Ice 1007 } // end of namespace Ice
OLDNEW
« src/IceClFlags.h ('K') | « src/IceClFlags.h ('k') | src/PNaClTranslator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698