================
@@ -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:

What about expressions that are consumed by a successor of this block?  Is it 
OK to drop those?
Also, depending on the answer to these questions, this almost sounds like "live 
expressions analysis".
In case this is related, we might want to use terminology from that as opposed 
to "consumed". 

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