This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Move frame_pointer_needed to rtl_data


On Sun, May 25, 2008 at 04:30:19PM +0200, Richard Guenther wrote:
> On Mon, May 19, 2008 at 11:32 AM, Ye, Joey <joey.ye@intel.com> wrote:
> > Updated with recent changes. OK to mainline?
> >
> > 2008-05-19  Joey Ye  <joey.ye@intel.com>
> >            H.J. Lu  <hongjiu.lu@intel.com>
> >
> >        * function.h (function): Move
> >        stack_realign_needed, preferred_stack_boundary
> >        to rtl_data.
> >        (rtl_data): Add new field drap_reg, stack_alignment_estimated,
> >        stack_realign_really, need_drap, save_param_ptr_reg,
> >        stack_realign_processed, stack_realign_finalized and
> >        stack_realign_used, stack_realign_needed.
> >        (frame_pointer_needed): New macro.
> >        (stack_realign_fp): New macro.
> >        (stack_realign_drap): Likewise.
> >
> >        * flags.h (frame_pointer_needed): Removed.
> >        * final.c (frame_pointer_needed): Likewise.
> >
> > Index: flags.h
> > ===================================================================
> > --- flags.h     (revision 135492)
> > +++ flags.h     (working copy)
> > @@ -223,12 +223,6 @@ extern int flag_dump_rtl_in_asm;
> >
> >  /* Other basic status info about current function.  */
> >
> > -/* Nonzero means current function must be given a frame pointer.
> > -   Set in stmt.c if anything is allocated on the stack there.
> > -   Set in reload1.c if anything is allocated on the stack there.  */
> > -
> > -extern int frame_pointer_needed;
> > -
> >  /* Nonzero if subexpressions must be evaluated from left-to-right.  */
> >  extern int flag_evaluation_order;
> >
> > Index: final.c
> > ===================================================================
> > --- final.c     (revision 135492)
> > +++ final.c     (working copy)
> > @@ -178,12 +178,6 @@ CC_STATUS cc_status;
> >  CC_STATUS cc_prev_status;
> >  #endif
> >
> > -/* Nonzero means current function must be given a frame pointer.
> > -   Initialized in function.c to 0.  Set only in reload1.c as per
> > -   the needs of the function.  */
> > -
> > -int frame_pointer_needed;
> > -
> >  /* Number of unmatched NOTE_INSN_BLOCK_BEG notes we have seen.  */
> >
> >  static int block_depth;
> 
> If you split out the move of frame_pointer_needed this part is pre-approved for
> mainline.  But why change the name to need_frame_pointer in crtl?  Please
> keep the original name we easily recognize.

I am checking in this patch into trunk. Tested on Linux/Intel64.

Thanks.


H.J.
----
2008-05-25  H.J. Lu  <hongjiu.lu@intel.com>

	* final.c (frame_pointer_needed): Removed.
	* flags.h (frame_pointer_needed): Likewise.

	* function.h (rtl_data): Add frame_pointer_needed.
	(frame_pointer_needed): New.

Index: flags.h
===================================================================
--- flags.h	(revision 135869)
+++ flags.h	(working copy)
@@ -223,12 +223,6 @@
 
 /* Other basic status info about current function.  */
 
-/* Nonzero means current function must be given a frame pointer.
-   Set in stmt.c if anything is allocated on the stack there.
-   Set in reload1.c if anything is allocated on the stack there.  */
-
-extern int frame_pointer_needed;
-
 /* Nonzero if subexpressions must be evaluated from left-to-right.  */
 extern int flag_evaluation_order;
 
Index: final.c
===================================================================
--- final.c	(revision 135869)
+++ final.c	(working copy)
@@ -178,12 +178,6 @@
 CC_STATUS cc_prev_status;
 #endif
 
-/* Nonzero means current function must be given a frame pointer.
-   Initialized in function.c to 0.  Set only in reload1.c as per
-   the needs of the function.  */
-
-int frame_pointer_needed;
-
 /* Number of unmatched NOTE_INSN_BLOCK_BEG notes we have seen.  */
 
 static int block_depth;
Index: function.h
===================================================================
--- function.h	(revision 135869)
+++ function.h	(working copy)
@@ -392,6 +392,11 @@
 
   /* Nonzero if code to initialize arg_pointer_save_area has been emitted.  */
   bool arg_pointer_save_area_init;
+
+  /* Nonzero means current function must be given a frame pointer.
+     Set in stmt.c if anything is allocated on the stack there.
+     Set in reload1.c if anything is allocated on the stack there.  */
+  bool frame_pointer_needed;
 };
 
 #define return_label (crtl->x_return_label)
@@ -405,6 +410,7 @@
 #define avail_temp_slots (crtl->x_avail_temp_slots)
 #define temp_slot_level (crtl->x_temp_slot_level)
 #define nonlocal_goto_handler_labels (crtl->x_nonlocal_goto_handler_labels)
+#define frame_pointer_needed (crtl->frame_pointer_needed)
 
 extern GTY(()) struct rtl_data x_rtl;
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]