[PATCH] D155049: [ScalarEvolution] Infer loop max trip count from memory accesses

Liren.Peng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 12 01:15:18 PDT 2023


Peakulorain created this revision.
Peakulorain added reviewers: reames, nikic, mkazantsev, xbolva00.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
Peakulorain requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Data references in a loop should not access elements over the
statically allocated size. So we can infer a loop max trip count
from this undefined behavior.


https://reviews.llvm.org/D155049

Files:
  llvm/include/llvm/Analysis/ScalarEvolution.h
  llvm/lib/Analysis/ScalarEvolution.cpp
  llvm/unittests/Analysis/ScalarEvolutionTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155049.539422.patch
Type: text/x-patch
Size: 22659 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230712/ffd43980/attachment.bin>


More information about the llvm-commits mailing list