Patch to solve PR 38426

Dmitry Gorbachev d.g.gorbachev@gmail.com
Tue Dec 9 20:58:00 GMT 2008


ChangeLog

2008-11-09  Dmitry Gorbachev  <d.g.gorbachev@gmail.com>

	PR rtl-optimization/38426
	* ira.c (ira): Update current_function_is_leaf before
	call to setup_eliminable_regset.

===================================================================
--- ira.c	2008-12-06 08:57:40.000000000 +0300
+++ ira.c	2008-12-09 04:00:22.000000000 +0300
@@ -1791,8 +1791,14 @@

   max_regno_before_ira = allocated_reg_info_size = max_reg_num ();
   allocate_reg_info ();
+
+  /* Determine if the current function is a leaf before running IRA
+     since this can impact optimizations done by the prologue and
+     epilogue thus changing register elimination offsets.  */
+  current_function_is_leaf = leaf_function_p ();
+
   setup_eliminable_regset ();
-
+
   ira_overall_cost = ira_reg_cost = ira_mem_cost = 0;
   ira_load_cost = ira_store_cost = ira_shuffle_cost = 0;
   ira_move_loops_num = ira_additional_jumps_num = 0;
@@ -1860,11 +1866,6 @@
   delete_trivially_dead_insns (get_insns (), max_reg_num ());
   max_regno = max_reg_num ();

-  /* Determine if the current function is a leaf before running IRA
-     since this can impact optimizations done by the prologue and
-     epilogue thus changing register elimination offsets.  */
-  current_function_is_leaf = leaf_function_p ();
-
   /* And the reg_equiv_memory_loc array.  */
   VEC_safe_grow (rtx, gc, reg_equiv_memory_loc_vec, max_regno);
   memset (VEC_address (rtx, reg_equiv_memory_loc_vec), 0,



More information about the Gcc-patches mailing list