llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[clang][dataflow] Analysis misses Widen calls when there are goto backedges

Open jvoung opened this issue 10 months ago • 0 comments

In the clang dataflow framework, we currently call widenTypeErased when isBackedgeNode, but isBackedgeNode only considers CFG nodes with a loop target. It misses backedges formed by goto (we see this in some examples like mysql mf_keycache.cc). If Widen is important for termination, this could lead to iterating until the analysis reaches the MaxBlockVisits, which is much much longer than if the analysis is able to Widen.

I have tried adding some simple backedge detection to augment the isBackedgeNode and seen reduction of hangs (e.g., in mf_keycache.cc).

jvoung avatar Feb 01 '26 03:02 jvoung