[PATCH] D131645: [clang][dataflow] Allow user-provided lattices to provide a widen operator

Eric Li via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 10 21:57:38 PDT 2022


li.zhe.hua created this revision.
Herald added subscribers: martong, xazax.hun.
Herald added a reviewer: NoQ.
Herald added a project: All.
li.zhe.hua requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

In order to better support convergence in a sound way, we allow users
to provide a widen operator for their lattice type. This can be
implemented for lattices of infinite (or sufficiently large) height in
order to reach convergence in loops.

If not provided, this defaults to the existing `join` operation that
is required to be defined. This is a sound default, as `join` would be
at least more precise than a theoretical `widen`.

Tracking bug: #56931

Depends on D131644 <https://reviews.llvm.org/D131644>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131645

Files:
  clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h
  clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h
  clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131645.451719.patch
Type: text/x-patch
Size: 6950 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220811/97768454/attachment-0001.bin>


More information about the cfe-commits mailing list