diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-03-13 19:34:55 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-03-13 19:34:55 +0000 |
commit | 07ff9b03f6bf750e491cdde73f943a65f58f0d80 (patch) | |
tree | 807d766deaa4cbbc4d66679e1ec9820eceb75c94 /llvm/lib/IR/Module.cpp | |
parent | 720762e2c0fc849342996302c37471b35e3537c8 (diff) | |
download | llvm-07ff9b03f6bf750e491cdde73f943a65f58f0d80.zip llvm-07ff9b03f6bf750e491cdde73f943a65f58f0d80.tar.gz llvm-07ff9b03f6bf750e491cdde73f943a65f58f0d80.tar.bz2 |
instcombine: alloca: Limit array size type promotion
Move type promotion of the size of the array allocation to the end of
`simplifyAllocaArraySize()`. This avoids promoting the type of the
array size if it's a `ConstantInt`, since the next -instcombine
iteration will drop it to a scalar allocation anyway. Similarly, this
avoids promoting the type if it's an `UndefValue`, in which case the
alloca gets RAUW'ed.
This is NFC when considered over the lifetime of -instcombine, since
it's just reducing the number of iterations needed to reach fixed point.
llvm-svn: 232201
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
0 files changed, 0 insertions, 0 deletions