[llvm] [DA] Simplify runtime predicate collection and extend to all dependence tests (PR #157523)

Ryotaro Kasuga via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 10 01:24:02 PDT 2025


================
@@ -3584,7 +3584,12 @@ SCEVUnionPredicate DependenceInfo::getRuntimeAssumptions() const {
 std::unique_ptr<Dependence>
 DependenceInfo::depends(Instruction *Src, Instruction *Dst,
                         bool UnderRuntimeAssumptions) {
-  SmallVector<const SCEVPredicate *, 4> Assume;
+  // Set the flag for whether we're allowed to add runtime assumptions.
+  this->UnderRuntimeAssumptions = UnderRuntimeAssumptions;
+
+  // Clear any previous assumptions
+  Assumptions = SCEVUnionPredicate({}, *SE);
----------------
kasuga-fj wrote:

If it is cleared at the beginning, I think there is no longer any reason to retain it in DependenceInfo

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


More information about the llvm-commits mailing list