[llvm] [DA] Simplify runtime predicate collection and extend to all dependence tests (PR #157523)
Sebastian Pop via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 9 09:29:26 PDT 2025
================
@@ -4036,6 +4049,12 @@ DependenceInfo::depends(Instruction *Src, Instruction *Dst,
return nullptr;
}
+ // If runtime assumptions were added but not allowed, return confused
+ // dependence.
+ if (!UnderRuntimeAssumptions && !Assumptions.empty())
+ return std::make_unique<Dependence>(Src, Dst, getNonRedundantAssumptions());
----------------
sebpop wrote:
> I think using assert like UnderRuntimeAssumptions || Assumptions.empty() would be better here. We should not add any runtime assumptions if it's not allowed.
Correct. I changed the condition to an assert.
This change adds early returns when we know there's need for runtime predicates that are not allowed.
I found out that we were recording runtime predicates also for dependence tests that were failing to prove or disprove any dependence. I modified the code to only record runtime predicates when the dependence test succeeds. There is no point in recording predicates that did not help prove the dependence info.
https://github.com/llvm/llvm-project/pull/157523
More information about the llvm-commits
mailing list