| 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 /// \file | 10 /// \file |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 } | 531 } |
| 532 | 532 |
| 533 void lowerGlobalsIfNoCodeHasBeenSeen() { | 533 void lowerGlobalsIfNoCodeHasBeenSeen() { |
| 534 if (HasSeenCode) | 534 if (HasSeenCode) |
| 535 return; | 535 return; |
| 536 constexpr char NoSuffix[] = ""; | 536 constexpr char NoSuffix[] = ""; |
| 537 lowerGlobals(NoSuffix); | 537 lowerGlobals(NoSuffix); |
| 538 HasSeenCode = true; | 538 HasSeenCode = true; |
| 539 } | 539 } |
| 540 | 540 |
| 541 void addBlockInfoPtrs(VariableDeclaration *ProfileBlockInfo); |
| 542 |
| 541 llvm::SmallVector<ThreadContext *, 128> AllThreadContexts; | 543 llvm::SmallVector<ThreadContext *, 128> AllThreadContexts; |
| 542 llvm::SmallVector<std::thread, 128> TranslationThreads; | 544 llvm::SmallVector<std::thread, 128> TranslationThreads; |
| 543 llvm::SmallVector<std::thread, 128> EmitterThreads; | 545 llvm::SmallVector<std::thread, 128> EmitterThreads; |
| 544 // Each thread has its own TLS pointer which is also held in | 546 // Each thread has its own TLS pointer which is also held in |
| 545 // AllThreadContexts. | 547 // AllThreadContexts. |
| 546 ICE_TLS_DECLARE_FIELD(ThreadContext *, TLS); | 548 ICE_TLS_DECLARE_FIELD(ThreadContext *, TLS); |
| 547 | 549 |
| 548 // Private helpers for mangleName() | 550 // Private helpers for mangleName() |
| 549 using ManglerVector = llvm::SmallVector<char, 32>; | 551 using ManglerVector = llvm::SmallVector<char, 32>; |
| 550 void incrementSubstitutions(ManglerVector &OldName) const; | 552 void incrementSubstitutions(ManglerVector &OldName) const; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 explicit OstreamLocker(GlobalContext *Ctx) : Ctx(Ctx) { Ctx->lockStr(); } | 603 explicit OstreamLocker(GlobalContext *Ctx) : Ctx(Ctx) { Ctx->lockStr(); } |
| 602 ~OstreamLocker() { Ctx->unlockStr(); } | 604 ~OstreamLocker() { Ctx->unlockStr(); } |
| 603 | 605 |
| 604 private: | 606 private: |
| 605 GlobalContext *const Ctx; | 607 GlobalContext *const Ctx; |
| 606 }; | 608 }; |
| 607 | 609 |
| 608 } // end of namespace Ice | 610 } // end of namespace Ice |
| 609 | 611 |
| 610 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H | 612 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H |
| OLD | NEW |