[Unroll] Extract the logic for caching SCEV-modeled GEPs with their
authorChandler Carruth <chandlerc@gmail.com>
Fri, 22 May 2015 03:02:22 +0000 (03:02 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Fri, 22 May 2015 03:02:22 +0000 (03:02 +0000)
commitf5ed85b2c8c34f1623002026187a4dd515a4b14b
tree409961bf37457bb0e5948b69b98a4529a6ab9c74
parent9233137390a935ee2834f82a627c9fde5402db04
[Unroll] Extract the logic for caching SCEV-modeled GEPs with their
simplified model for use simulating each iteration into a separate
helper function that just returns the cache.

Building this cache had nothing to do with the rest of the unroll
analysis and so this removes an unnecessary coupling, etc. It should
also make it easier to think about the concept of providing fast cached
access to basic SCEV models as an orthogonal concept to the overall
unroll simulation.

I'd really like to see this kind of caching logic folded into SCEV
itself, it seems weird for us to provide it at this layer rather than
making repeated queries into SCEV fast all on their own.

No functionality changed.

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