Clean up how we rewrite loads and stores to the whole alloca. When these
authorChandler Carruth <chandlerc@gmail.com>
Sat, 13 Oct 2012 02:41:05 +0000 (02:41 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sat, 13 Oct 2012 02:41:05 +0000 (02:41 +0000)
commit520eeaeffd5ef724ea5c68192f77331571f38060
tree9e874bec01bcd368b503775175e70e08e96ecf09
parent84125ca43c758fd21fdab2b05196e0df57c55c96
Clean up how we rewrite loads and stores to the whole alloca. When these
are single value types, the load and store should be directly based upon
the alloca and then bitcasting can fix the type as needed afterward.
This might in theory improve some of the IR coming out of SROA, but
I don't expect big changes yet and don't have any test cases on hand.
This is really just a cleanup/refactoring patch. The next patch will
cause this code path to be hit a lot more, actually get SROA to promote
more allocas and include several more test cases.

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