[PATCH] D139403: [SCEV] Compute symbolic exit count for 'and' conditions

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 6 01:28:29 PST 2022


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

If loop exits by condition like `A < B && X < Y`, and at least one of symbolic max
exit counts for these conditions is known, it can be used as estimate of symbolic
max exit count for whole branch. If both are known, then we can use their umin
as the estimate.


https://reviews.llvm.org/D139403

Files:
  llvm/lib/Analysis/ScalarEvolution.cpp
  llvm/test/Analysis/ScalarEvolution/addrec-computed-during-addrec-calculation.ll
  llvm/test/Analysis/ScalarEvolution/symbolic_max_exit_count.ll
  llvm/test/Analysis/ScalarEvolution/trip-count10.ll
  llvm/test/Analysis/ScalarEvolution/trip-count7.ll
  llvm/test/Analysis/ScalarEvolution/widenable-condition.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139403.480380.patch
Type: text/x-patch
Size: 8514 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221206/21412216/attachment.bin>


More information about the llvm-commits mailing list