mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
SROA: Avoid struct and array types early to avoid creating an overly large integer type.
Fixes PR14465. Differential Revision: http://llvm-reviews.chandlerc.com/D148 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169084 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2164,6 +2164,9 @@ static bool isIntegerWideningViable(const DataLayout &TD,
|
||||
AllocaPartitioning::const_use_iterator I,
|
||||
AllocaPartitioning::const_use_iterator E) {
|
||||
uint64_t SizeInBits = TD.getTypeSizeInBits(AllocaTy);
|
||||
// Don't create integer types larger than the maximum bitwidth.
|
||||
if (SizeInBits > IntegerType::MAX_INT_BITS)
|
||||
return false;
|
||||
|
||||
// Don't try to handle allocas with bit-padding.
|
||||
if (SizeInBits != TD.getTypeStoreSizeInBits(AllocaTy))
|
||||
|
||||
Reference in New Issue
Block a user