Issue 179083
Summary [clang][dataflow] Analysis misses Widen calls when there are goto backedges
Labels clang:dataflow
Assignees jvoung
Reporter jvoung
    In the clang dataflow framework, we currently call `widenTypeErased` when `isBackedgeNode`, but [`isBackedgeNode`](https://github.com/llvm/llvm-project/blob/bba5371e3290fe3c47bd4fb6707ae3ce222b892f/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp#L67) 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`).

_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to