[llvm-commits] [llvm] r65672 - /llvm/branches/Apple/Dib/lib/Transforms/Scalar/ScalarReplAggregates.cpp
Evan Cheng
evan.cheng at apple.com
Fri Feb 27 17:33:05 PST 2009
Author: evancheng
Date: Fri Feb 27 19:33:05 2009
New Revision: 65672
URL: http://llvm.org/viewvc/llvm-project?rev=65672&view=rev
Log:
Do not turn aggregate whose size exceeeds threshold into arbitrary large scalar.
Modified:
llvm/branches/Apple/Dib/lib/Transforms/Scalar/ScalarReplAggregates.cpp
Modified: llvm/branches/Apple/Dib/lib/Transforms/Scalar/ScalarReplAggregates.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/lib/Transforms/Scalar/ScalarReplAggregates.cpp?rev=65672&r1=65671&r2=65672&view=diff
==============================================================================
--- llvm/branches/Apple/Dib/lib/Transforms/Scalar/ScalarReplAggregates.cpp (original)
+++ llvm/branches/Apple/Dib/lib/Transforms/Scalar/ScalarReplAggregates.cpp Fri Feb 27 19:33:05 2009
@@ -286,7 +286,8 @@
const Type *VectorTy = 0;
bool HadAVector = false;
if (CanConvertToScalar(AI, IsNotTrivial, VectorTy, HadAVector,
- 0, unsigned(AllocaSize)) && IsNotTrivial) {
+ 0, unsigned(AllocaSize)) && IsNotTrivial &&
+ AllocaSize <= SRThreshold) {
AllocaInst *NewAI;
// If we were able to find a vector type that can handle this with
// insert/extract elements, and if there was at least one use that had
More information about the llvm-commits
mailing list