[llvm-commits] [poolalloc] r111123 - /poolalloc/trunk/lib/DSA/Local.cpp

John Criswell criswell at uiuc.edu
Mon Aug 16 07:43:25 PDT 2010


Author: criswell
Date: Mon Aug 16 09:43:25 2010
New Revision: 111123

URL: http://llvm.org/viewvc/llvm-project?rev=111123&view=rev
Log:
Fixed PR#7914.  When increasing the DSNode size for vararg arguments, make sure
that we're only trying to make the DSNode larger and not smaller.
Otherwise, we hit an assertion about trying to shrink the size of the DSNode.

Modified:
    poolalloc/trunk/lib/DSA/Local.cpp

Modified: poolalloc/trunk/lib/DSA/Local.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/Local.cpp?rev=111123&r1=111122&r2=111123&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/Local.cpp (original)
+++ poolalloc/trunk/lib/DSA/Local.cpp Mon Aug 16 09:43:25 2010
@@ -686,7 +686,8 @@
     case Triple::x86:
       // On x86, we have:
       // va_list as a pointer to an array of pointers to the variable arguments
-      N->growSize(1);
+      if (N->getSize() < 1)
+        N->growSize(1);
       N->setLink(0, VAArray);
       break;
     case Triple::x86_64:
@@ -694,7 +695,8 @@
       // The first i8* is where arguments generally go, but the second i8* can be used
       // also to pass arguments by register.
       // We model this by having both the i8*'s point to an array of pointers to the arguments.
-      N->growSize(24); //sizeof the va_list struct mentioned above
+      if (N->getSize() < 1)
+        N->growSize(24); //sizeof the va_list struct mentioned above
       N->setLink(8,VAArray); //first i8*
       N->setLink(16,VAArray); //second i8*
       break;





More information about the llvm-commits mailing list