[PATCH] D156658: [clang][dataflow] When checking `ExprToLoc` convergence, only consider children of block terminator.

Martin Böhme via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 31 07:00:36 PDT 2023


mboehme added a comment.

Retracting from review. I think I was overly hasty with this change:

- There are edges between expressions that cross CFG block boundaries but don't involve block terminators. Here's an example <https://godbolt.org/z/WzYhseTs5> -- [B1 <https://reviews.llvm.org/B1>.1] has [B2 <https://reviews.llvm.org/B2>.1] as a child, yet [B2 <https://reviews.llvm.org/B2>] doesn't even have a terminator.

- More fundamentally, convergence is not only important when considering the environment as an input to successor blocks, but also as a basis for the diagnostics that we will emit, which may look at arbitrary expressions in the block. So we really want all expressions to be fully converged.

It looks as if, instead, what we should be doing to improve convergence in a sound manner is to implement widening for `ExprToLoc`. I'll submit a corresponding patch shortly.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156658/new/

https://reviews.llvm.org/D156658



More information about the cfe-commits mailing list