[llvm] [Passes] Generalize ShouldRunExtraVectorPasses to allow re-use (NFCI). (PR #118323)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 4 06:10:55 PST 2024


================
@@ -113,6 +80,16 @@ class SimpleLoopUnswitchPass : public PassInfoMixin<SimpleLoopUnswitchPass> {
                      function_ref<StringRef(StringRef)> MapClassName2PassName);
 };
 
+/// A marker analysis to determine if SimpleLoopUnswitch should run again on a
+/// given loop.
+struct ShouldRunExtraSimpleLoopUnswitch
+    : public ShouldRunExtraPasses<ShouldRunExtraSimpleLoopUnswitch>,
+      public AnalysisInfoMixin<ShouldRunExtraSimpleLoopUnswitch> {
+  static AnalysisKey Key;
+
+  static bool isRequired() { return true; }
----------------
nikic wrote:

Do we need this isRequired? I thought that's only relevant for passes.

https://github.com/llvm/llvm-project/pull/118323


More information about the llvm-commits mailing list