|
44 | 44 | #include "llvm/IR/Analysis.h" |
45 | 45 | #include "llvm/IR/Function.h" |
46 | 46 | #include "llvm/IR/Module.h" |
47 | | -#include "llvm/IR/PassInstrumentation.h" |
48 | 47 | #include "llvm/IR/PassManagerInternal.h" |
49 | 48 | #include "llvm/Support/TypeName.h" |
50 | 49 | #include <cassert> |
@@ -143,12 +142,6 @@ getAnalysisResult(AnalysisManager<IRUnitT, AnalysisArgTs...> &AM, IRUnitT &IR, |
143 | 142 |
|
144 | 143 | } // namespace detail |
145 | 144 |
|
146 | | -// Forward declare the pass instrumentation analysis explicitly queried in |
147 | | -// generic PassManager code. |
148 | | -// FIXME: figure out a way to move PassInstrumentationAnalysis into its own |
149 | | -// header. |
150 | | -class PassInstrumentationAnalysis; |
151 | | - |
152 | 145 | /// Manages a sequence of passes over a particular unit of IR. |
153 | 146 | /// |
154 | 147 | /// A pass manager contains a sequence of passes to run over a particular unit |
@@ -238,32 +231,6 @@ extern template class PassManager<Function>; |
238 | 231 | /// Convenience typedef for a pass manager over functions. |
239 | 232 | using FunctionPassManager = PassManager<Function>; |
240 | 233 |
|
241 | | -/// Pseudo-analysis pass that exposes the \c PassInstrumentation to pass |
242 | | -/// managers. Goes before AnalysisManager definition to provide its |
243 | | -/// internals (e.g PassInstrumentationAnalysis::ID) for use there if needed. |
244 | | -/// FIXME: figure out a way to move PassInstrumentationAnalysis into its own |
245 | | -/// header. |
246 | | -class PassInstrumentationAnalysis |
247 | | - : public AnalysisInfoMixin<PassInstrumentationAnalysis> { |
248 | | - friend AnalysisInfoMixin<PassInstrumentationAnalysis>; |
249 | | - static AnalysisKey Key; |
250 | | - |
251 | | - PassInstrumentationCallbacks *Callbacks; |
252 | | - |
253 | | -public: |
254 | | - /// PassInstrumentationCallbacks object is shared, owned by something else, |
255 | | - /// not this analysis. |
256 | | - PassInstrumentationAnalysis(PassInstrumentationCallbacks *Callbacks = nullptr) |
257 | | - : Callbacks(Callbacks) {} |
258 | | - |
259 | | - using Result = PassInstrumentation; |
260 | | - |
261 | | - template <typename IRUnitT, typename AnalysisManagerT, typename... ExtraArgTs> |
262 | | - Result run(IRUnitT &, AnalysisManagerT &, ExtraArgTs &&...) { |
263 | | - return PassInstrumentation(Callbacks); |
264 | | - } |
265 | | -}; |
266 | | - |
267 | 234 | /// A container for analyses that lazily runs them and caches their |
268 | 235 | /// results. |
269 | 236 | /// |
|
0 commit comments