[PATCH] D119631: [SCEV] Replace SCEVComparePredicate with a wrapped SCEV expression

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 12 08:15:47 PST 2022


reames created this revision.
reames added reviewers: lebedev.ri, fhahn, nikic, mkazantsev.
Herald added subscribers: rogfer01, javed.absar, bollu, hiraditya, mcrosier.
reames requested review of this revision.
Herald added a subscriber: vkmr.
Herald added a project: LLVM.

This builds on D119558 <https://reviews.llvm.org/D119558>, and shows how having a compare node in SCEV itself lets us start to simplify the predication mechanism used in SCEVPredicate.  This initial patch only handles the SCEVComparePredicate node, but once this lands, I plan to tackle the other leaf node type (SCEVWrapPredicate) and then the union wrapper.

Once this line of work is done, we will be able to form more general predicates, and will have eliminated all the duplicate logic in SCEVPredicate.  The later will make it easier to keep the code correct, and the former will enable a couple of use cases which have come up in discussion over the last couple months.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119631

Files:
  llvm/include/llvm/Analysis/ScalarEvolution.h
  llvm/include/llvm/Transforms/Utils/ScalarEvolutionExpander.h
  llvm/lib/Analysis/ScalarEvolution.cpp
  llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
  llvm/test/Analysis/LoopAccessAnalysis/symbolic-stride.ll
  llvm/test/Transforms/LoopDistribute/symbolic-stride.ll
  llvm/test/Transforms/LoopLoadElim/symbolic-stride.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119631.408182.patch
Type: text/x-patch
Size: 20601 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220212/01afbfd2/attachment.bin>


More information about the llvm-commits mailing list