[PATCH] D114784: [SCEV] Track backedge taken count users (NFCI)

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 30 02:29:52 PST 2021


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

Track which SCEVs are used as ExactNotTaken counts in BackedgeTakenInfo structures, so we can directly determine which loops need to be invalidated, rather than iterating over all BECounts.

This gives a small compile-time improvement on average (https://llvm-compile-time-tracker.com/compare.php?from=77dd579827f2e7574be4bbf3f94a48930e7b094f&to=72d45d2131f55751be7654e5d13115fe5b150dbb&stat=instructions), but the motivation here is more to ensure there are no degenerate cases, if the number of backedge taken counts is large.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114784

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114784.390636.patch
Type: text/x-patch
Size: 7214 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211130/6bcb4550/attachment.bin>


More information about the llvm-commits mailing list