OSDN Git Service

[LoopReroll] Introduce the concept of DAGRootSets.
authorJames Molloy <james.molloy@arm.com>
Wed, 11 Feb 2015 09:19:47 +0000 (09:19 +0000)
committerJames Molloy <james.molloy@arm.com>
Wed, 11 Feb 2015 09:19:47 +0000 (09:19 +0000)
commitcaba7561ae7fd0f1161ac32b2068d7e5ac9926a5
treeb1c38b0d524284374f5a6c75c62b85ea58599fc3
parent5b71fffa58913a265edc909d5b912512c00f9e7a
[LoopReroll] Introduce the concept of DAGRootSets.

A DAGRootSet models an induction variable being used in a rerollable
loop. For example:

   x[i*3+0] = y1
   x[i*3+1] = y2
   x[i*3+2] = y3

   Base instruction -> i*3
                    +---+----+
                   /    |     \
               ST[y1]  +1     +2  <-- Roots
                        |      |
                      ST[y2] ST[y3]

There may be multiple DAGRootSets, for example:

   x[i*2+0] = ...   (1)
   x[i*2+1] = ...   (1)
   x[i*2+4] = ...   (2)
   x[i*2+5] = ...   (2)
   x[(i+1234)*2+5678] = ... (3)
   x[(i+1234)*2+5679] = ... (3)

This concept is similar to the "Scale" member used previously, but allows
multiple independent sets of roots based off the same induction variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228821 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopRerollPass.cpp
test/Transforms/LoopReroll/basic.ll