| 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 Intrinsics IntrinsicsInfo; | 166 Intrinsics IntrinsicsInfo; |
| 167 const TargetArch Arch; | 167 const TargetArch Arch; |
| 168 const OptLevel Opt; | 168 const OptLevel Opt; |
| 169 const IceString TestPrefix; | 169 const IceString TestPrefix; |
| 170 const ClFlags &Flags; | 170 const ClFlags &Flags; |
| 171 bool HasEmittedFirstMethod; | 171 bool HasEmittedFirstMethod; |
| 172 RandomNumberGenerator RNG; | 172 RandomNumberGenerator RNG; |
| 173 CodeStats StatsFunction; | 173 CodeStats StatsFunction; |
| 174 CodeStats StatsCumulative; | 174 CodeStats StatsCumulative; |
| 175 std::unique_ptr<class TimerStack> Timers; | 175 std::unique_ptr<class TimerStack> Timers; |
| 176 GlobalContext(const GlobalContext &) LLVM_DELETED_FUNCTION; | 176 GlobalContext(const GlobalContext &) = delete; |
| 177 GlobalContext &operator=(const GlobalContext &) LLVM_DELETED_FUNCTION; | 177 GlobalContext &operator=(const GlobalContext &) = delete; |
| 178 | 178 |
| 179 // Private helpers for mangleName() | 179 // Private helpers for mangleName() |
| 180 typedef llvm::SmallVector<char, 32> ManglerVector; | 180 typedef llvm::SmallVector<char, 32> ManglerVector; |
| 181 void incrementSubstitutions(ManglerVector &OldName) const; | 181 void incrementSubstitutions(ManglerVector &OldName) const; |
| 182 }; | 182 }; |
| 183 | 183 |
| 184 // Helper class to push and pop a timer marker. The constructor | 184 // Helper class to push and pop a timer marker. The constructor |
| 185 // pushes a marker, and the destructor pops it. This is for | 185 // pushes a marker, and the destructor pops it. This is for |
| 186 // convenient timing of regions of code. | 186 // convenient timing of regions of code. |
| 187 class TimerMarker { | 187 class TimerMarker { |
| 188 TimerMarker(const TimerMarker &) LLVM_DELETED_FUNCTION; | 188 TimerMarker(const TimerMarker &) = delete; |
| 189 TimerMarker &operator=(const TimerMarker &) LLVM_DELETED_FUNCTION; | 189 TimerMarker &operator=(const TimerMarker &) = delete; |
| 190 | 190 |
| 191 public: | 191 public: |
| 192 TimerMarker(TimerIdT ID, GlobalContext *Ctx) | 192 TimerMarker(TimerIdT ID, GlobalContext *Ctx) |
| 193 : ID(ID), Ctx(Ctx), Active(Ctx->getFlags().SubzeroTimingEnabled) { | 193 : ID(ID), Ctx(Ctx), Active(Ctx->getFlags().SubzeroTimingEnabled) { |
| 194 if (Active) | 194 if (Active) |
| 195 Ctx->pushTimer(ID); | 195 Ctx->pushTimer(ID); |
| 196 } | 196 } |
| 197 ~TimerMarker() { | 197 ~TimerMarker() { |
| 198 if (Active) | 198 if (Active) |
| 199 Ctx->popTimer(ID); | 199 Ctx->popTimer(ID); |
| 200 } | 200 } |
| 201 | 201 |
| 202 private: | 202 private: |
| 203 TimerIdT ID; | 203 TimerIdT ID; |
| 204 GlobalContext *const Ctx; | 204 GlobalContext *const Ctx; |
| 205 const bool Active; | 205 const bool Active; |
| 206 }; | 206 }; |
| 207 | 207 |
| 208 } // end of namespace Ice | 208 } // end of namespace Ice |
| 209 | 209 |
| 210 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H | 210 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H |
| OLD | NEW |