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 // This file defines aspects of the compilation that persist across | 10 // This file defines aspects of the compilation that persist across |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 TimerMarker T1(Ice::TimerStack::TT_emit, this); | 357 TimerMarker T1(Ice::TimerStack::TT_emit, this); |
358 if (getFlags().getOutFileType() == FT_Elf) { | 358 if (getFlags().getOutFileType() == FT_Elf) { |
359 getObjectWriter()->writeInitialELFHeader(); | 359 getObjectWriter()->writeInitialELFHeader(); |
360 } else { | 360 } else { |
361 if (!ALLOW_DUMP) | 361 if (!ALLOW_DUMP) |
362 llvm::report_fatal_error("emitFileHeader for non-ELF"); | 362 llvm::report_fatal_error("emitFileHeader for non-ELF"); |
363 TargetHeaderLowering::createLowering(this)->lower(); | 363 TargetHeaderLowering::createLowering(this)->lower(); |
364 } | 364 } |
365 } | 365 } |
366 | 366 |
367 void GlobalContext::lowerConstants() { | 367 void GlobalContext::lowerConstants() { DataLowering->lowerConstants(); } |
368 DataLowering->lowerConstants(); | |
369 } | |
370 | 368 |
371 void GlobalContext::lowerGlobals(const IceString &SectionSuffix) { | 369 void GlobalContext::lowerGlobals(const IceString &SectionSuffix) { |
372 TimerMarker T(TimerStack::TT_emitGlobalInitializers, this); | 370 TimerMarker T(TimerStack::TT_emitGlobalInitializers, this); |
373 const bool DumpGlobalVariables = | 371 const bool DumpGlobalVariables = |
374 ALLOW_DUMP && Flags.getVerbose() && Flags.getVerboseFocusOn().empty(); | 372 ALLOW_DUMP && Flags.getVerbose() && Flags.getVerboseFocusOn().empty(); |
375 if (DumpGlobalVariables) { | 373 if (DumpGlobalVariables) { |
376 OstreamLocker L(this); | 374 OstreamLocker L(this); |
377 Ostream &Stream = getStrDump(); | 375 Ostream &Stream = getStrDump(); |
378 for (const Ice::VariableDeclaration *Global : Globals) { | 376 for (const Ice::VariableDeclaration *Global : Globals) { |
379 Global->dump(this, Stream); | 377 Global->dump(this, Stream); |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 Ctx = Func->getContext(); | 892 Ctx = Func->getContext(); |
895 Active = | 893 Active = |
896 Func->getFocusedTiming() || Ctx->getFlags().getSubzeroTimingEnabled(); | 894 Func->getFocusedTiming() || Ctx->getFlags().getSubzeroTimingEnabled(); |
897 if (Active) | 895 if (Active) |
898 Ctx->pushTimer(ID, StackID); | 896 Ctx->pushTimer(ID, StackID); |
899 } | 897 } |
900 | 898 |
901 ICE_TLS_DEFINE_FIELD(GlobalContext::ThreadContext *, GlobalContext, TLS); | 899 ICE_TLS_DEFINE_FIELD(GlobalContext::ThreadContext *, GlobalContext, TLS); |
902 | 900 |
903 } // end of namespace Ice | 901 } // end of namespace Ice |
OLD | NEW |