[llvm] [Analysis] Avoid running transform passes that have just been run (PR #112092)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 14 17:26:34 PDT 2024


================
@@ -43,12 +43,19 @@ struct InstCombineOptions {
     MaxIterations = Value;
     return *this;
   }
+
+  /// Only enable skipping when two versions of parameters are exactly the same.
+  bool isCompatibleWith(const InstCombineOptions &LastOption) const {
+    return VerifyFixpoint == LastOption.VerifyFixpoint &&
----------------
dtcxzyw wrote:

> given this, perhaps we should start with simplifycfg instead of instcombine since simplifycfg has pass params, and add some lit tests that make sure we skip a simplifycfg rerun if the params are the same and don't skip if params are different.

I plan to support SimplifyCFG in the subsequent patch. I have added some unittests for passes with parameters.


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


More information about the llvm-commits mailing list