[llvm] [Analysis] Avoid running transform passes that have just been run (PR #112092)
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 14 10:59:48 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 &&
----------------
aeubanks wrote:
`VerifyFixpoint` doesn't affect the output, it just crashes if an extra round causes changes
and given that the current intent of instcombine is to almost always ensure everything is done in one iteration, I don't think we need `isCompatibleWith` for instcombine. @nikic
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. we might need to add debug logging and check for that in the test
https://github.com/llvm/llvm-project/pull/112092
More information about the llvm-commits
mailing list