| OLD | NEW |
| 1 //===- subzero/src/IceGlobalContext.h - Global context defs -----*- C++ -*-===// | 1 //===- subzero/src/IceGlobalContext.h - Global context defs -----*- C++ -*-===// |
| 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 declares aspects of the compilation that persist across | 10 // This file declares aspects of the compilation that persist across |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 // large, in order to control memory footprint. | 293 // large, in order to control memory footprint. |
| 294 void optQueueBlockingPush(std::unique_ptr<Cfg> Func); | 294 void optQueueBlockingPush(std::unique_ptr<Cfg> Func); |
| 295 // Takes a Cfg from the work queue for translating. May block if | 295 // Takes a Cfg from the work queue for translating. May block if |
| 296 // the work queue is currently empty. Returns nullptr if there is | 296 // the work queue is currently empty. Returns nullptr if there is |
| 297 // no more work - the queue is empty and either end() has been | 297 // no more work - the queue is empty and either end() has been |
| 298 // called or the Sequential flag was set. | 298 // called or the Sequential flag was set. |
| 299 std::unique_ptr<Cfg> optQueueBlockingPop(); | 299 std::unique_ptr<Cfg> optQueueBlockingPop(); |
| 300 // Notifies that no more work will be added to the work queue. | 300 // Notifies that no more work will be added to the work queue. |
| 301 void optQueueNotifyEnd() { OptQ.notifyEnd(); } | 301 void optQueueNotifyEnd() { OptQ.notifyEnd(); } |
| 302 | 302 |
| 303 // Emit file header for output file. |
| 304 void emitFileHeader(); |
| 305 |
| 303 void emitQueueBlockingPush(EmitterWorkItem *Item); | 306 void emitQueueBlockingPush(EmitterWorkItem *Item); |
| 304 EmitterWorkItem *emitQueueBlockingPop(); | 307 EmitterWorkItem *emitQueueBlockingPop(); |
| 305 void emitQueueNotifyEnd() { EmitQ.notifyEnd(); } | 308 void emitQueueNotifyEnd() { EmitQ.notifyEnd(); } |
| 306 | 309 |
| 307 void initParserThread() { | 310 void initParserThread() { |
| 308 ThreadContext *Tls = new ThreadContext(); | 311 ThreadContext *Tls = new ThreadContext(); |
| 309 auto Timers = getTimers(); | 312 auto Timers = getTimers(); |
| 310 Timers->initInto(Tls->Timers); | 313 Timers->initInto(Tls->Timers); |
| 311 AllThreadContexts.push_back(Tls); | 314 AllThreadContexts.push_back(Tls); |
| 312 ICE_TLS_SET_FIELD(TLS, Tls); | 315 ICE_TLS_SET_FIELD(TLS, Tls); |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 explicit OstreamLocker(GlobalContext *Ctx) : Ctx(Ctx) { Ctx->lockStr(); } | 513 explicit OstreamLocker(GlobalContext *Ctx) : Ctx(Ctx) { Ctx->lockStr(); } |
| 511 ~OstreamLocker() { Ctx->unlockStr(); } | 514 ~OstreamLocker() { Ctx->unlockStr(); } |
| 512 | 515 |
| 513 private: | 516 private: |
| 514 GlobalContext *const Ctx; | 517 GlobalContext *const Ctx; |
| 515 }; | 518 }; |
| 516 | 519 |
| 517 } // end of namespace Ice | 520 } // end of namespace Ice |
| 518 | 521 |
| 519 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H | 522 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H |
| OLD | NEW |