[PATCH] D110385: [SCEV] Verify contents of cached Block Dispositions

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 24 00:04:58 PDT 2021


mkazantsev created this revision.
mkazantsev added reviewers: reames, nikic, lebedev.ri, fhahn, skatkov.
Herald added subscribers: javed.absar, hiraditya.
mkazantsev requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

We have some evidence that SCEV's cached BlockDispositions are sometimes
wrong (i.e. cached result is different from what `computeBlockDisposition` would
return), but not clear where and how exactly it happened.

Currently SCEV blindly believes that its cache is valid and does not bother to check
it, so such problems may lurk between passes. This patch tries to fix this situation.

Here we add verification that all cached values correspond to what would be computed
for them without cache. So far, 3 unit tests are failing, however not for the described reason,
but because of dangling pointers. So adding XFAIL to them.

We should fix all cache-related problems before we can move on and find what's
causing inconsistencies in cache.


https://reviews.llvm.org/D110385

Files:
  llvm/include/llvm/Analysis/ScalarEvolution.h
  llvm/lib/Analysis/ScalarEvolution.cpp
  llvm/test/Transforms/LCSSA/pr44058.ll
  llvm/test/Transforms/LCSSA/pr44320.ll
  llvm/test/Transforms/LoopFusion/triple_loop_nest_inner_guard.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110385.374736.patch
Type: text/x-patch
Size: 7631 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210924/1b29a716/attachment.bin>


More information about the llvm-commits mailing list