[PATCH] D67035: [LVI] Look through extractvalue of insertvalue
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 31 03:07:56 PDT 2019
nikic created this revision.
nikic added reviewers: reames, lebedev.ri, spatel.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
This addresses the issue mentioned on D19867 <https://reviews.llvm.org/D19867>. When we simplify with.overflow instructions in CVP, we leave behind extractvalue of insertvalue sequences that LVI no longer understands. This means that we can not simplify any instructions based on the with.overflow anymore (until some over pass like InstCombine cleans them up).
This patch extends LVI extractvalue handling by calling SimplifyExtractValueInst (which doesn't do anything more than constant folding + looking through insertvalue) and using the block value of the simplification.
A possible alternative would be to do something similar to SimplifyIndVars, where we instead directly try to replace extractvalue users of the with.overflow. This would need some some additional structural changes to CVP, as it's currently not legal to remove anything but the current instruction -- we'd have to introduce a worklist with instructions scheduled for deletion or similar.
Repository:
rL LLVM
https://reviews.llvm.org/D67035
Files:
llvm/lib/Analysis/LazyValueInfo.cpp
llvm/test/Transforms/CorrelatedValuePropagation/overflows.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67035.218210.patch
Type: text/x-patch
Size: 4355 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190831/4634de6d/attachment.bin>
More information about the llvm-commits
mailing list