[PATCH] D44252: [CVP] [LVI] Add LVI::getPredicateInBlock and use it in CVP.

Justin Lebar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 8 06:03:04 PST 2018


jlebar created this revision.
jlebar added reviewers: sanjoy, spatel.
Herald added a subscriber: hiraditya.

LVI::getPredicateInBlock is like LVI::getPredicateAt, but uses the more
powerful getValueInBlock API, instead of getValueAt.  This lets it solve
things like x & y < z.

This came out of a discussion in https://reviews.llvm.org/D44102, in which sanjoy@ realized that
getConstantRange, which calls getValueInBlock, was more powerful than
getPredicateAt, which calls getValueAt.


https://reviews.llvm.org/D44252

Files:
  llvm/include/llvm/Analysis/LazyValueInfo.h
  llvm/lib/Analysis/LazyValueInfo.cpp
  llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
  llvm/test/Transforms/CorrelatedValuePropagation/ashr.ll
  llvm/test/Transforms/CorrelatedValuePropagation/icmp.ll
  llvm/test/Transforms/CorrelatedValuePropagation/non-null.ll
  llvm/test/Transforms/CorrelatedValuePropagation/sdiv.ll
  llvm/test/Transforms/CorrelatedValuePropagation/srem.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44252.137561.patch
Type: text/x-patch
Size: 13610 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180308/8b13f471/attachment.bin>


More information about the llvm-commits mailing list