[PATCH] D119558: [SCEV] Add SCEVCompareExpr node

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 11 09:54:43 PST 2022


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

A SCEVCompareExpr node represents the boolean result of performing a comparison as specified by it's predicate and operands.  This is essentially an extension of the IR instruction icmp into SCEV.

We've talked about this off and on for a while, but I think it's time to actually do this.

I want to highlight that adding the node does not mean we have to extend IR pattern matching.   At the moment, I'm planning on using this to simplify and generalize PredicatedScalarEvolution and the loop versioning checks used by various transforms.  The decision as to whether we want these in generic SCEV expressions can (and should be) explicitly deferred here.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119558

Files:
  llvm/include/llvm/Analysis/ScalarEvolution.h
  llvm/include/llvm/Analysis/ScalarEvolutionDivision.h
  llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h
  llvm/include/llvm/Transforms/Utils/ScalarEvolutionExpander.h
  llvm/lib/Analysis/ScalarEvolution.cpp
  llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119558.407930.patch
Type: text/x-patch
Size: 11845 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220211/1ba1b853/attachment.bin>


More information about the llvm-commits mailing list