diff options
| author | Bill Wendling <isanbard@gmail.com> | 2009-03-03 12:12:58 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2009-03-03 12:12:58 +0000 |
| commit | 3e44bf3c4b23d8fe3ba6add2a4426067423ea82e (patch) | |
| tree | a548c067dc152801d7777e5146e1f6b5e0c9450d /llvm/lib | |
| parent | 33435e49a99efe439081e34c29276745cf35e827 (diff) | |
| download | bcm5719-llvm-3e44bf3c4b23d8fe3ba6add2a4426067423ea82e.tar.gz bcm5719-llvm-3e44bf3c4b23d8fe3ba6add2a4426067423ea82e.zip | |
Reapply r65755, but reversing "<" to ">=".
llvm-svn: 65945
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp index 3a4201bf81e..ee4b87227ae 100644 --- a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp @@ -253,11 +253,12 @@ bool SROA::performScalarRepl(Function &F) { // (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 |

