calls.c (expand_call): Don't use callgraph to increase preferred_stack_boundary.
authorH.J. Lu <hongjiu.lu@intel.com>
Sat, 10 May 2008 00:41:39 +0000 (00:41 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Sat, 10 May 2008 00:41:39 +0000 (17:41 -0700)
2008-05-09  H.J. Lu  <hongjiu.lu@intel.com>

* calls.c (expand_call): Don't use callgraph to increase
preferred_stack_boundary.

* cgraph.h (cgraph_rtl_info): Use unsigned on
preferred_incoming_stack_boundary.

* final.c (rest_of_clean_state): Use unsigned on
preferred_stack_boundary.

From-SVN: r135134

gcc/ChangeLog
gcc/calls.c
gcc/cgraph.h
gcc/final.c

index 3d1e78add322839a7a849e1a222623383195fe72..d9cb32655eee297d8bcef16343a7fbbf38d35f80 100644 (file)
@@ -1,3 +1,14 @@
+2008-05-09  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * calls.c (expand_call): Don't use callgraph to increase
+       preferred_stack_boundary.
+
+       * cgraph.h (cgraph_rtl_info): Use unsigned on
+       preferred_incoming_stack_boundary.
+
+       * final.c (rest_of_clean_state): Use unsigned on
+       preferred_stack_boundary.
+
 2008-05-09  Tom Tromey  <tromey@redhat.com>
 
        PR preprocessor/22231:
index bbb9b769c490765fcedc1f0f2c018232ad76c8cd..ac8398271252ac6cf748b436865fec9b4fc2cbc5 100644 (file)
@@ -2109,7 +2109,14 @@ expand_call (tree exp, rtx target, int ignore)
   if (fndecl)
     {
       struct cgraph_rtl_info *i = cgraph_rtl_info (fndecl);
-      if (i && i->preferred_incoming_stack_boundary)
+      /* Without automatic stack alignment, we can't increase preferred
+        stack boundary.  With automatic stack alignment, it is
+        unnecessary since unless we can guarantee that all callers will
+        align the outgoing stack properly, callee has to align its
+        stack anyway.  */
+      if (i
+         && i->preferred_incoming_stack_boundary
+         && i->preferred_incoming_stack_boundary < preferred_stack_boundary)
        preferred_stack_boundary = i->preferred_incoming_stack_boundary;
     }
 
index 3b65dc829146b0d72beb8248e570f60edea11100..97b5e1fd48498d4f9fe5d5134fb31e50368e1594 100644 (file)
@@ -118,7 +118,7 @@ struct cgraph_global_info GTY(())
 
 struct cgraph_rtl_info GTY(())
 {
-   int preferred_incoming_stack_boundary;
+   unsigned int preferred_incoming_stack_boundary;
 };
 
 /* The cgraph data structure.
index ccef70f00f1e3f1f51a944bc1154ff5da3962e93..b3185811ad648aabd8919da330dbeaa3881f24e7 100644 (file)
@@ -4239,7 +4239,7 @@ rest_of_clean_state (void)
 
   if (targetm.binds_local_p (current_function_decl))
     {
-      int pref = crtl->preferred_stack_boundary;
+      unsigned int pref = crtl->preferred_stack_boundary;
       if (crtl->stack_alignment_needed > crtl->preferred_stack_boundary)
         pref = crtl->stack_alignment_needed;
       cgraph_rtl_info (current_function_decl)->preferred_incoming_stack_boundary