mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-05 11:17:53 +00:00
[PM] Introduce a utility pass that preserves no analyses.
Use this to test that path of invalidation. This test actually shows redundant invalidation here that is really bad. I'm going to work on fixing that next, but wanted to commit the test harness now that its all working. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225257 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -816,6 +816,20 @@ template <typename AnalysisT> struct NoopAnalysisInvalidationPass {
|
||||
static StringRef name() { return "No-op Analysis Invalidation Pass"; }
|
||||
};
|
||||
|
||||
/// \brief A utility pass that does nothing but preserves no analyses.
|
||||
///
|
||||
/// As a consequence fo not preserving any analyses, this pass will force all
|
||||
/// analysis passes to be re-run to produce fresh results if any are needed.
|
||||
struct InvalidateAllAnalysesPass {
|
||||
/// \brief Run this pass over some unit of IR.
|
||||
template <typename T>
|
||||
PreservedAnalyses run(T &&Arg) {
|
||||
return PreservedAnalyses::none();
|
||||
}
|
||||
|
||||
static StringRef name() { return "InvalidateAllAnalysesPass"; }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user