[PATCH] D60098: [POC] Iterative hoisting during trivial unswitch
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 1 14:10:39 PDT 2019
reames created this revision.
Herald added subscribers: asbirlea, jdoerfert, javed.absar, george.burgess.iv, bollu, Prazek, mcrosier.
This is not really ready for review; posted as a proof of concept since the use of SCEV's disposition ties into the discussion on D60093 <https://reviews.llvm.org/D60093>.
The basic idea to this is to be able to unswitch a long chain of range checks on different arrays all in a single invocation of SimpleLoopUnswitch. Right now, we're not able to so since each dominating check we eliminate prevents hoisting of dominated lengths. (Correctly.) If we decide to integrate the InvariantComputation logic from D60093 <https://reviews.llvm.org/D60093> into SCEV's disposition handling, then we'll be able to prove that an invariant load (which the length would be) would be invariant after hoisting.
We might also be able to do a form of hoisting here using MSSA, but I haven't actually looked into that yet.
https://reviews.llvm.org/D60098
Files:
lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
test/Transforms/SimpleLoopUnswitch/trivial-unswitch.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60098.193177.patch
Type: text/x-patch
Size: 3980 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190401/38f5042c/attachment.bin>
More information about the llvm-commits
mailing list