[llvm-commits] [llvm] r96718 - /llvm/trunk/include/llvm/Attributes.h

Charles Davis cdavis at mines.edu
Sat Feb 20 20:26:06 PST 2010


Author: cdavis
Date: Sat Feb 20 22:26:06 2010
New Revision: 96718

URL: http://llvm.org/viewvc/llvm-project?rev=96718&view=rev
Log:
Reduce size of 'StackAlignment' field from 5 to 3 bits. Seriously, who needs a
2GB-aligned stack anyway? 256 bytes is plenty. Requested by Chris.

Modified:
    llvm/trunk/include/llvm/Attributes.h

Modified: llvm/trunk/include/llvm/Attributes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Attributes.h?rev=96718&r1=96717&r2=96718&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Attributes.h (original)
+++ llvm/trunk/include/llvm/Attributes.h Sat Feb 20 22:26:06 2010
@@ -60,11 +60,11 @@
 const Attributes Naked           = 1<<24; ///< Naked function
 const Attributes InlineHint      = 1<<25; ///< source said inlining was
                                           ///desirable
-const Attributes StackAlignment  = 31<<26; ///< Alignment of stack for
-                                           ///function (5 bits) stored as log2
-                                           ///of alignment with +1 bias
-                                           ///0 means unaligned (different from
-                                           ///alignstack(1))
+const Attributes StackAlignment  = 7<<26; ///< Alignment of stack for
+                                          ///function (3 bits) stored as log2
+                                          ///of alignment with +1 bias
+                                          ///0 means unaligned (different from
+                                          ///alignstack(1))
 
 /// @brief Attributes that only apply to function parameters.
 const Attributes ParameterOnly = ByVal | Nest | StructRet | NoCapture;
@@ -118,7 +118,7 @@
     return 0;
 
   assert(isPowerOf2_32(i) && "Alignment must be a power of two.");
-  assert(i <= 0x40000000 && "Alignment too large.");
+  assert(i <= 0x100 && "Alignment too large.");
   return (Log2_32(i)+1) << 26;
 }
 





More information about the llvm-commits mailing list