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] Remove TARGET_LATE_RTL_PROLOGUE_EPILOGUE


Hello,

I added this target hook some months ago to ease the transition to RTL 
prologue/epilogue on the SPARC.  The transition is now complete and the hook 
has been unused since then.

Bootstrapped/regtested on amd64-mandrake-linux-gnu.  OK for mainline?


2004-11-15 ?Eric Botcazou ?<ebotcazou@libertysurf.fr>

	* target.h (late_rtl_prologue_epilogue): Remove.
	* target-def.h (TARGET_LATE_RTL_PROLOGUE_EPILOGUE): Remove.
	* passes.c (rest_of_handle_prologue_epilogue): Remove and move
	remaining bits to...
	(rest_of_handle_flow2): ...here.
	(rest_of_compilation): Remove call to rest_of_handle_prologue_epilogue.
	* doc/tm.texi (TARGET_LATE_RTL_PROLOGUE_EPILOGUE): Remove.


-- 
Eric Botcazou
Index: target.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/target.h,v
retrieving revision 1.118
diff -u -p -r1.118 target.h
--- target.h	1 Oct 2004 05:08:56 -0000	1.118
+++ target.h	15 Nov 2004 10:17:01 -0000
@@ -597,11 +597,6 @@ struct gcc_target
   /* True if #pragma extern_prefix is to be supported.  */
   bool handle_pragma_extern_prefix;
 
-  /* True if the RTL prologue and epilogue should be expanded after all
-     passes that modify the instructions (and not merely reorder them)
-     have been run.  */
-  bool late_rtl_prologue_epilogue;
-
   /* Leave the boolean fields at the end.  */
 };
 
Index: target-def.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/target-def.h,v
retrieving revision 1.106
diff -u -p -r1.106 target-def.h
--- target-def.h	1 Oct 2004 05:08:55 -0000	1.106
+++ target-def.h	15 Nov 2004 10:17:01 -0000
@@ -398,7 +398,6 @@ Foundation, 59 Temple Place - Suite 330,
 
 #define TARGET_GIMPLIFY_VA_ARG_EXPR std_gimplify_va_arg_expr
 #define TARGET_PASS_BY_REFERENCE hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false
-#define TARGET_LATE_RTL_PROLOGUE_EPILOGUE false
 #define TARGET_MUST_PASS_IN_STACK must_pass_in_stack_var_size_or_pad
 #define TARGET_CALLEE_COPIES hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false
 
@@ -537,7 +536,6 @@ Foundation, 59 Temple Place - Suite 330,
   TARGET_ASM_FILE_START_FILE_DIRECTIVE,		\
   TARGET_HANDLE_PRAGMA_REDEFINE_EXTNAME,	\
   TARGET_HANDLE_PRAGMA_EXTERN_PREFIX,		\
-  TARGET_LATE_RTL_PROLOGUE_EPILOGUE,		\
 }
 
 #include "hooks.h"
Index: passes.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/passes.c,v
retrieving revision 2.55
diff -u -p -r2.55 passes.c
--- passes.c	12 Nov 2004 16:37:40 -0000	2.55
+++ passes.c	15 Nov 2004 10:17:01 -0000
@@ -1317,24 +1317,6 @@ rest_of_handle_eh (void)
     }
 }
 
-
-static void
-rest_of_handle_prologue_epilogue (void)
-{
-  if (optimize && !flow2_completed)
-    cleanup_cfg (CLEANUP_EXPENSIVE);
-
-  /* On some machines, the prologue and epilogue code, or parts thereof,
-     can be represented as RTL.  Doing so lets us schedule insns between
-     it and the rest of the code and also allows delayed branch
-     scheduling to operate in the epilogue.  */
-  thread_prologue_and_epilogue_insns (get_insns ());
-  epilogue_completed = 1;
-
-  if (optimize && flow2_completed)
-    life_analysis (dump_file, PROP_POSTRELOAD);
-}
-
 static void
 rest_of_handle_stack_adjustments (void)
 {
@@ -1372,8 +1354,15 @@ rest_of_handle_flow2 (void)
   if (flag_branch_target_load_optimize)
     rest_of_handle_branch_target_load_optimize ();
 
-  if (!targetm.late_rtl_prologue_epilogue)
-    rest_of_handle_prologue_epilogue ();
+  if (optimize)
+    cleanup_cfg (CLEANUP_EXPENSIVE);
+
+  /* On some machines, the prologue and epilogue code, or parts thereof,
+     can be represented as RTL.  Doing so lets us schedule insns between
+     it and the rest of the code and also allows delayed branch
+     scheduling to operate in the epilogue.  */
+  thread_prologue_and_epilogue_insns (get_insns ());
+  epilogue_completed = 1;
 
   if (optimize)
     rest_of_handle_stack_adjustments ();
@@ -1768,9 +1757,6 @@ rest_of_compilation (void)
     = optimize > 0 && only_leaf_regs_used () && leaf_function_p ();
 #endif
 
-  if (targetm.late_rtl_prologue_epilogue)
-    rest_of_handle_prologue_epilogue ();
-
 #ifdef INSN_SCHEDULING
   if (optimize > 0 && flag_schedule_insns_after_reload)
     rest_of_handle_sched2 ();
Index: doc/tm.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/tm.texi,v
retrieving revision 1.391
diff -u -p -r1.391 tm.texi
--- doc/tm.texi	5 Nov 2004 01:36:57 -0000	1.391
+++ doc/tm.texi	15 Nov 2004 10:17:08 -0000
@@ -4271,16 +4271,6 @@ arguments that a function should pop.  @
 @c tell?  --mew 5feb93
 @end deftypefn
 
-@deftypefn {Target Hook} bool TARGET_LATE_RTL_PROLOGUE_EPILOGUE
-If set to @code{true}, it instructs the compiler to emit the RTL prologue
-and epilogue later in the game than usual, namely after all passes that
-modify the instructions (and not merely reorder them) have been run.  In
-particular, the C variable @code{current_function_uses_only_leaf_regs} is
-valid at that point.  This can be used on machines that have "register
-windows" to optimize away the regular "push" on the register stack.
-@xref{Leaf Functions}.
-@end deftypefn
-
 @itemize @bullet
 @item
 @findex current_function_pretend_args_size

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