[LoopReroll] Alter the data structures used during reroll validation.
authorJames Molloy <james.molloy@arm.com>
Thu, 29 Jan 2015 21:52:03 +0000 (21:52 +0000)
committerJames Molloy <james.molloy@arm.com>
Thu, 29 Jan 2015 21:52:03 +0000 (21:52 +0000)
commit3eb64280e1f1dd9de3294f0b07412d49d28b9ec0
treec3d4862ed120e263a6992a54d855a6fedaf74107
parent5a75088c2f2cda30bc7c09f912cd27b71bed0709
[LoopReroll] Alter the data structures used during reroll validation.

The validation algorithm used an incremental approach, building each
iteration's data structures temporarily, validating them, then
adding them to a global set.

This does not scale well to having multiple sets of Root nodes, as the
set of instructions used in each iteration is the union over all
the root nodes. Therefore, refactor the logic to create a single, simple
container to which later logic then refers. This makes it simpler
control-flow wise to make the creation of the container more complex with
the addition of multiple root sets.

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