[llvm-commits] [llvm] r65946 - /llvm/branches/Apple/Dib/lib/Transforms/Scalar/ScalarReplAggregates.cpp
Bill Wendling
isanbard at gmail.com
Tue Mar 3 04:16:23 PST 2009
Author: void
Date: Tue Mar 3 06:16:22 2009
New Revision: 65946
URL: http://llvm.org/viewvc/llvm-project?rev=65946&view=rev
Log:
--- Merging (from foreign repository) r65945 into '.':
U lib/Transforms/Scalar/ScalarReplAggregates.cpp
Reapply r65755, but reversing "<" to ">=".
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=65946&r1=65945&r2=65946&view=diff
==============================================================================
--- llvm/branches/Apple/Dib/lib/Transforms/Scalar/ScalarReplAggregates.cpp (original)
+++ llvm/branches/Apple/Dib/lib/Transforms/Scalar/ScalarReplAggregates.cpp Tue Mar 3 06:16:22 2009
@@ -253,11 +253,12 @@
// (allocations OF arrays are ok though), and an allocation of a scalar
// value cannot be decomposed at all.
uint64_t AllocaSize = TD->getTypePaddedSize(AI->getAllocatedType());
+
+ // Do not promote any struct whose size is too big.
+ if (AllocaSize >= SRThreshold) continue;
if ((isa<StructType>(AI->getAllocatedType()) ||
isa<ArrayType>(AI->getAllocatedType())) &&
- // Do not promote any struct whose size is too big.
- AllocaSize < SRThreshold &&
// Do not promote any struct into more than "32" separate vars.
getNumSAElements(AI->getAllocatedType()) < SRThreshold/4) {
// Check that all of the users of the allocation are capable of being
More information about the llvm-commits
mailing list