| 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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 Pending.resize(Index + 1); | 362 Pending.resize(Index + 1); |
| 363 } | 363 } |
| 364 | 364 |
| 365 } // end of anonymous namespace | 365 } // end of anonymous namespace |
| 366 | 366 |
| 367 void GlobalContext::emitFileHeader() { | 367 void GlobalContext::emitFileHeader() { |
| 368 TimerMarker T1(Ice::TimerStack::TT_emit, this); | 368 TimerMarker T1(Ice::TimerStack::TT_emit, this); |
| 369 if (getFlags().getOutFileType() == FT_Elf) { | 369 if (getFlags().getOutFileType() == FT_Elf) { |
| 370 getObjectWriter()->writeInitialELFHeader(); | 370 getObjectWriter()->writeInitialELFHeader(); |
| 371 } else { | 371 } else { |
| 372 if (!ALLOW_DUMP) | 372 if (!ALLOW_DUMP) { |
| 373 llvm::report_fatal_error("emitFileHeader for non-ELF"); | 373 getStrError() << "emitFileHeader for non-ELF"; |
| 374 getErrorStatus()->assign(EC_Translation); |
| 375 } |
| 374 TargetHeaderLowering::createLowering(this)->lower(); | 376 TargetHeaderLowering::createLowering(this)->lower(); |
| 375 } | 377 } |
| 376 } | 378 } |
| 377 | 379 |
| 378 void GlobalContext::lowerConstants() { DataLowering->lowerConstants(); } | 380 void GlobalContext::lowerConstants() { DataLowering->lowerConstants(); } |
| 379 | 381 |
| 380 void GlobalContext::lowerGlobals(const IceString &SectionSuffix) { | 382 void GlobalContext::lowerGlobals(const IceString &SectionSuffix) { |
| 381 TimerMarker T(TimerStack::TT_emitGlobalInitializers, this); | 383 TimerMarker T(TimerStack::TT_emitGlobalInitializers, this); |
| 382 const bool DumpGlobalVariables = | 384 const bool DumpGlobalVariables = |
| 383 ALLOW_DUMP && Flags.getVerbose() && Flags.getVerboseFocusOn().empty(); | 385 ALLOW_DUMP && Flags.getVerbose() && Flags.getVerboseFocusOn().empty(); |
| (...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 919 Ctx = Func->getContext(); | 921 Ctx = Func->getContext(); |
| 920 Active = | 922 Active = |
| 921 Func->getFocusedTiming() || Ctx->getFlags().getSubzeroTimingEnabled(); | 923 Func->getFocusedTiming() || Ctx->getFlags().getSubzeroTimingEnabled(); |
| 922 if (Active) | 924 if (Active) |
| 923 Ctx->pushTimer(ID, StackID); | 925 Ctx->pushTimer(ID, StackID); |
| 924 } | 926 } |
| 925 | 927 |
| 926 ICE_TLS_DEFINE_FIELD(GlobalContext::ThreadContext *, GlobalContext, TLS); | 928 ICE_TLS_DEFINE_FIELD(GlobalContext::ThreadContext *, GlobalContext, TLS); |
| 927 | 929 |
| 928 } // end of namespace Ice | 930 } // end of namespace Ice |
| OLD | NEW |