diff options
author | dim <dim@FreeBSD.org> | 2012-12-23 13:04:00 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-12-23 13:04:00 +0000 |
commit | a931043751d62613cff21d7eea760e17669bef4f (patch) | |
tree | b0e228ab641b9204bdb26457f30ee376e0e17fc7 /contrib/llvm/lib/Transforms | |
parent | 9e0012da52e98f166c4351de0bd020fbd7b4b49d (diff) | |
download | FreeBSD-src-a931043751d62613cff21d7eea760e17669bef4f.zip FreeBSD-src-a931043751d62613cff21d7eea760e17669bef4f.tar.gz |
Upgrade our copy of llvm/clang to 3.2 release.
Release notes for llvm:
http://llvm.org/releases/3.2/docs/ReleaseNotes.html
Release notes for clang:
http://llvm.org/releases/3.2/tools/clang/docs/ReleaseNotes.html
MFC after: 2 weeks
Diffstat (limited to 'contrib/llvm/lib/Transforms')
-rw-r--r-- | contrib/llvm/lib/Transforms/Scalar/SROA.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/llvm/lib/Transforms/Scalar/SROA.cpp b/contrib/llvm/lib/Transforms/Scalar/SROA.cpp index 959b4e7..640ea31 100644 --- a/contrib/llvm/lib/Transforms/Scalar/SROA.cpp +++ b/contrib/llvm/lib/Transforms/Scalar/SROA.cpp @@ -2160,6 +2160,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)) @@ -2198,7 +2201,7 @@ static bool isIntegerWideningViable(const DataLayout &TD, if (RelBegin == 0 && RelEnd == Size) WholeAllocaOp = true; if (IntegerType *ITy = dyn_cast<IntegerType>(LI->getType())) { - if (ITy->getBitWidth() < TD.getTypeStoreSize(ITy)) + if (ITy->getBitWidth() < TD.getTypeStoreSizeInBits(ITy)) return false; continue; } @@ -2214,7 +2217,7 @@ static bool isIntegerWideningViable(const DataLayout &TD, if (RelBegin == 0 && RelEnd == Size) WholeAllocaOp = true; if (IntegerType *ITy = dyn_cast<IntegerType>(ValueTy)) { - if (ITy->getBitWidth() < TD.getTypeStoreSize(ITy)) + if (ITy->getBitWidth() < TD.getTypeStoreSizeInBits(ITy)) return false; continue; } |