================
@@ -311,7 +318,10 @@ computeBlockInputState(const CFGBlock &Block, 
AnalysisContext &AC) {
     }
   }
 
-  JoinedStateBuilder Builder(AC);
+  // When performing the join, only retain state for those expressions that are
+  // consumed by this block. This avoids performing joins and potentially
+  // extending the flow condition for expressions that we won't need anyway.
+  JoinedStateBuilder Builder(AC, AC.CFCtx.getExprConsumedByBlock(&Block));
----------------
Xazax-hun wrote:

Thanks! I think my main concerns are around convergence and `ExprToLoc`. 
Consider a simple loop like:
```
B1 ---> B2
^       |
 \______/
```

We have getStableStorageLocation that will first look up an expression in 
`ExprToLoc` and it will try to reuse the some location. In case we clear 
`ExprToLoc` along the back edge, in the second iteration through processing 
`B2` we would create new locations for the expressions.

Is this the intended effect here? 


https://github.com/llvm/llvm-project/pull/72850
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to