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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 template <typename T> T *allocate() { return Allocator.Allocate<T>(); } | 125 template <typename T> T *allocate() { return Allocator.Allocate<T>(); } |
126 | 126 |
127 const Intrinsics &getIntrinsicsInfo() const { return IntrinsicsInfo; } | 127 const Intrinsics &getIntrinsicsInfo() const { return IntrinsicsInfo; } |
128 | 128 |
129 // TODO(wala,stichnot): Make the RNG play nicely with multithreaded | 129 // TODO(wala,stichnot): Make the RNG play nicely with multithreaded |
130 // translation. | 130 // translation. |
131 RandomNumberGenerator &getRNG() { return RNG; } | 131 RandomNumberGenerator &getRNG() { return RNG; } |
132 | 132 |
133 // Reset stats at the beginning of a function. | 133 // Reset stats at the beginning of a function. |
134 void resetStats() { StatsFunction.reset(); } | 134 void resetStats() { StatsFunction.reset(); } |
135 void dumpStats(const IceString &Name); | 135 void dumpStats(const IceString &Name, bool Final = false); |
136 void statsUpdateEmitted(uint32_t InstCount) { | 136 void statsUpdateEmitted(uint32_t InstCount) { |
137 StatsFunction.updateEmitted(InstCount); | 137 StatsFunction.updateEmitted(InstCount); |
138 StatsCumulative.updateEmitted(InstCount); | 138 StatsCumulative.updateEmitted(InstCount); |
139 } | 139 } |
140 void statsUpdateRegistersSaved(uint32_t Num) { | 140 void statsUpdateRegistersSaved(uint32_t Num) { |
141 StatsFunction.updateRegistersSaved(Num); | 141 StatsFunction.updateRegistersSaved(Num); |
142 StatsCumulative.updateRegistersSaved(Num); | 142 StatsCumulative.updateRegistersSaved(Num); |
143 } | 143 } |
144 void statsUpdateFrameBytes(uint32_t Bytes) { | 144 void statsUpdateFrameBytes(uint32_t Bytes) { |
145 StatsFunction.updateFrameBytes(Bytes); | 145 StatsFunction.updateFrameBytes(Bytes); |
(...skipping 28 matching lines...) Expand all Loading... |
174 GlobalContext &operator=(const GlobalContext &) LLVM_DELETED_FUNCTION; | 174 GlobalContext &operator=(const GlobalContext &) LLVM_DELETED_FUNCTION; |
175 | 175 |
176 // Private helpers for mangleName() | 176 // Private helpers for mangleName() |
177 typedef llvm::SmallVector<char, 32> ManglerVector; | 177 typedef llvm::SmallVector<char, 32> ManglerVector; |
178 void incrementSubstitutions(ManglerVector &OldName) const; | 178 void incrementSubstitutions(ManglerVector &OldName) const; |
179 }; | 179 }; |
180 | 180 |
181 } // end of namespace Ice | 181 } // end of namespace Ice |
182 | 182 |
183 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H | 183 #endif // SUBZERO_SRC_ICEGLOBALCONTEXT_H |
OLD | NEW |