| 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 getFlags().getTranslateOnly())) { | 188 getFlags().getTranslateOnly())) { |
| 189 Func->dump(); | 189 Func->dump(); |
| 190 Cfg::setCurrentCfg(nullptr); | 190 Cfg::setCurrentCfg(nullptr); |
| 191 continue; // Func goes out of scope and gets deleted | 191 continue; // Func goes out of scope and gets deleted |
| 192 } | 192 } |
| 193 Func->translate(); | 193 Func->translate(); |
| 194 EmitterWorkItem *Item = nullptr; | 194 EmitterWorkItem *Item = nullptr; |
| 195 if (Func->hasError()) { | 195 if (Func->hasError()) { |
| 196 getErrorStatus()->assign(EC_Translation); | 196 getErrorStatus()->assign(EC_Translation); |
| 197 OstreamLocker L(this); | 197 OstreamLocker L(this); |
| 198 getStrDump() << "ICE translation error: " << Func->getError() << "\n"; | 198 getStrDump() << "ICE translation error: " << Func->getFunctionName() |
| 199 << ": " << Func->getError() << "\n"; |
| 199 Item = new EmitterWorkItem(Func->getSequenceNumber()); | 200 Item = new EmitterWorkItem(Func->getSequenceNumber()); |
| 200 } else { | 201 } else { |
| 201 Func->getAssembler<>()->setInternal(Func->getInternal()); | 202 Func->getAssembler<>()->setInternal(Func->getInternal()); |
| 202 switch (getFlags().getOutFileType()) { | 203 switch (getFlags().getOutFileType()) { |
| 203 case FT_Elf: | 204 case FT_Elf: |
| 204 case FT_Iasm: { | 205 case FT_Iasm: { |
| 205 Func->emitIAS(); | 206 Func->emitIAS(); |
| 206 // The Cfg has already emitted into the assembly buffer, so | 207 // The Cfg has already emitted into the assembly buffer, so |
| 207 // stats have been fully collected into this thread's TLS. | 208 // stats have been fully collected into this thread's TLS. |
| 208 // Dump them before TLS is reset for the next Cfg. | 209 // Dump them before TLS is reset for the next Cfg. |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 740 Ctx = Func->getContext(); | 741 Ctx = Func->getContext(); |
| 741 Active = | 742 Active = |
| 742 Func->getFocusedTiming() || Ctx->getFlags().getSubzeroTimingEnabled(); | 743 Func->getFocusedTiming() || Ctx->getFlags().getSubzeroTimingEnabled(); |
| 743 if (Active) | 744 if (Active) |
| 744 Ctx->pushTimer(ID, StackID); | 745 Ctx->pushTimer(ID, StackID); |
| 745 } | 746 } |
| 746 | 747 |
| 747 ICE_TLS_DEFINE_FIELD(GlobalContext::ThreadContext *, GlobalContext, TLS); | 748 ICE_TLS_DEFINE_FIELD(GlobalContext::ThreadContext *, GlobalContext, TLS); |
| 748 | 749 |
| 749 } // end of namespace Ice | 750 } // end of namespace Ice |
| OLD | NEW |