[PATCH] D131646: [clang][dataflow] Restructure loops to call widen on back edges

Eric Li via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 10 21:58:59 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.

When navigating a loop block, we call the lattice's widen operator,
which gives a lattice of infinite height the opportunity to reach
convergence.

As we enter the loop, we store the block state in the back edge block,
which represents the state after the zeroth iteration. Then, after
each loop iteration, we widen the previous iteration's state with the
new iteration's state.

Tracking bug: #56931

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131646

Files:
  clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp
  clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131646.451720.patch
Type: text/x-patch
Size: 7724 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220811/ef74c165/attachment.bin>


More information about the cfe-commits mailing list