| 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |