[llvm-commits] [llvm] r66227 - /llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp

Evan Cheng evan.cheng at apple.com
Thu Mar 5 16:56:43 PST 2009


Author: evancheng
Date: Thu Mar  5 18:56:43 2009
New Revision: 66227

URL: http://llvm.org/viewvc/llvm-project?rev=66227&view=rev
Log:
SRThreshold is meant to be inclusive.

Modified:
    llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp?rev=66227&r1=66226&r2=66227&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp Thu Mar  5 18:56:43 2009
@@ -260,7 +260,7 @@
     if ((isa<StructType>(AI->getAllocatedType()) ||
          isa<ArrayType>(AI->getAllocatedType())) &&
         // Do not promote any struct into more than "32" separate vars.
-        getNumSAElements(AI->getAllocatedType()) < SRThreshold/4) {
+        getNumSAElements(AI->getAllocatedType()) <= SRThreshold/4) {
       // Check that all of the users of the allocation are capable of being
       // transformed.
       switch (isSafeAllocaToScalarRepl(AI)) {





More information about the llvm-commits mailing list