| 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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 emitQueueBlockingPush(Item); | 368 emitQueueBlockingPush(Item); |
| 369 // The Cfg now gets deleted as Func goes out of scope. | 369 // The Cfg now gets deleted as Func goes out of scope. |
| 370 } | 370 } |
| 371 } | 371 } |
| 372 | 372 |
| 373 namespace { | 373 namespace { |
| 374 | 374 |
| 375 // Ensure Pending is large enough that Pending[Index] is valid. | 375 // Ensure Pending is large enough that Pending[Index] is valid. |
| 376 void resizePending(std::vector<EmitterWorkItem *> &Pending, uint32_t Index) { | 376 void resizePending(std::vector<EmitterWorkItem *> &Pending, uint32_t Index) { |
| 377 if (Index >= Pending.size()) | 377 if (Index >= Pending.size()) |
| 378 Pending.resize(Index + 1); | 378 Utils::reserveAndResize(Pending, Index + 1); |
| 379 } | 379 } |
| 380 | 380 |
| 381 } // end of anonymous namespace | 381 } // end of anonymous namespace |
| 382 | 382 |
| 383 void GlobalContext::emitFileHeader() { | 383 void GlobalContext::emitFileHeader() { |
| 384 TimerMarker T1(Ice::TimerStack::TT_emitAsm, this); | 384 TimerMarker T1(Ice::TimerStack::TT_emitAsm, this); |
| 385 if (getFlags().getOutFileType() == FT_Elf) { | 385 if (getFlags().getOutFileType() == FT_Elf) { |
| 386 getObjectWriter()->writeInitialELFHeader(); | 386 getObjectWriter()->writeInitialELFHeader(); |
| 387 } else { | 387 } else { |
| 388 if (!BuildDefs::dump()) { | 388 if (!BuildDefs::dump()) { |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 914 Ctx = Func->getContext(); | 914 Ctx = Func->getContext(); |
| 915 Active = | 915 Active = |
| 916 Func->getFocusedTiming() || Ctx->getFlags().getSubzeroTimingEnabled(); | 916 Func->getFocusedTiming() || Ctx->getFlags().getSubzeroTimingEnabled(); |
| 917 if (Active) | 917 if (Active) |
| 918 Ctx->pushTimer(ID, StackID); | 918 Ctx->pushTimer(ID, StackID); |
| 919 } | 919 } |
| 920 | 920 |
| 921 ICE_TLS_DEFINE_FIELD(GlobalContext::ThreadContext *, GlobalContext, TLS); | 921 ICE_TLS_DEFINE_FIELD(GlobalContext::ThreadContext *, GlobalContext, TLS); |
| 922 | 922 |
| 923 } // end of namespace Ice | 923 } // end of namespace Ice |
| OLD | NEW |