[SROA] Yet another slight refactoring that simplifies an API in the
authorChandler Carruth <chandlerc@gmail.com>
Wed, 26 Feb 2014 05:12:43 +0000 (05:12 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 26 Feb 2014 05:12:43 +0000 (05:12 +0000)
commitdd080790eb9184dd0cab95825b922a705bada613
treeb6a0e1e923c6e39f03ce289a18f2d78a5636e832
parentc9166f098ccaec4ce12dd19e64b08b4927ec74c0
[SROA] Yet another slight refactoring that simplifies an API in the
rewriting logic: don't pass custom offsets for the adjusted pointer to
the new alloca.

We always passed NewBeginOffset here. Sometimes we spelled it
BeginOffset, but only when they were in fact equal. Whats worse, the API
is set up so that you can't reasonably call it with anything else -- it
assumes that you're passing it an offset relative to the *original*
alloca that happens to fall within the new one. That's the whole point
of NewBeginOffset, it's the clamped beginning offset.

No functionality changed.

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