[SROA] Simplify the computing of alignment: we only ever need the
authorChandler Carruth <chandlerc@gmail.com>
Wed, 26 Feb 2014 05:02:19 +0000 (05:02 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 26 Feb 2014 05:02:19 +0000 (05:02 +0000)
commitc9166f098ccaec4ce12dd19e64b08b4927ec74c0
tree8ce0b0782cf26d31c31709a635be7984ca936435
parentf28c057c421122d0d0355e3cef496ef2de7a1f7f
[SROA] Simplify the computing of alignment: we only ever need the
alignment of the slice being rewritten, not any arbitrary offset.

Every caller is really just trying to compute the alignment for the
whole slice, never for some arbitrary alignment. They are also just
passing a type when they have one to see if we can skip an explicit
alignment in the IR by using the type's alignment. This makes for a much
simpler interface.

Another refactoring inspired by the addrspace patch for SROA, although
only loosely related.

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