Commit 88def637 by Vladimir Makarov Committed by Vladimir Makarov

re PR rtl-optimization/60317 (find_hard_regno_for compile time hog in libvpx)

2014-02-25  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/60317
	* params.def (PARAM_LRA_MAX_CONSIDERED_RELOAD_PSEUDOS): New.
	* params.h (LRA_MAX_CONSIDERED_RELOAD_PSEUDOS): New.
	* lra-assigns.c: Include params.h.
	(spill_for): Use LRA_MAX_CONSIDERED_RELOAD_PSEUDOS as guard for
	other reload pseudos considerations.

From-SVN: r208155
parent 6e6eaecc
2014-02-25 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/60317
* params.def (PARAM_LRA_MAX_CONSIDERED_RELOAD_PSEUDOS): New.
* params.h (LRA_MAX_CONSIDERED_RELOAD_PSEUDOS): New.
* lra-assigns.c: Include params.h.
(spill_for): Use LRA_MAX_CONSIDERED_RELOAD_PSEUDOS as guard for
other reload pseudos considerations.
2014-02-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com> 2014-02-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/vector.md (*vector_unordered<mode>): Change split * config/rs6000/vector.md (*vector_unordered<mode>): Change split
......
...@@ -94,6 +94,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -94,6 +94,7 @@ along with GCC; see the file COPYING3. If not see
#include "df.h" #include "df.h"
#include "ira.h" #include "ira.h"
#include "sparseset.h" #include "sparseset.h"
#include "params.h"
#include "lra-int.h" #include "lra-int.h"
/* Array containing corresponding values of function /* Array containing corresponding values of function
...@@ -896,14 +897,16 @@ spill_for (int regno, bitmap spilled_pseudo_bitmap) ...@@ -896,14 +897,16 @@ spill_for (int regno, bitmap spilled_pseudo_bitmap)
} }
} }
n = 0; n = 0;
EXECUTE_IF_SET_IN_SPARSESET (live_range_reload_inheritance_pseudos, if (sparseset_cardinality (live_range_reload_inheritance_pseudos)
reload_regno) <= LRA_MAX_CONSIDERED_RELOAD_PSEUDOS)
if ((int) reload_regno != regno EXECUTE_IF_SET_IN_SPARSESET (live_range_reload_inheritance_pseudos,
&& (ira_reg_classes_intersect_p reload_regno)
[rclass][regno_allocno_class_array[reload_regno]]) if ((int) reload_regno != regno
&& live_pseudos_reg_renumber[reload_regno] < 0 && (ira_reg_classes_intersect_p
&& find_hard_regno_for (reload_regno, &cost, -1) < 0) [rclass][regno_allocno_class_array[reload_regno]])
sorted_reload_pseudos[n++] = reload_regno; && live_pseudos_reg_renumber[reload_regno] < 0
&& find_hard_regno_for (reload_regno, &cost, -1) < 0)
sorted_reload_pseudos[n++] = reload_regno;
EXECUTE_IF_SET_IN_BITMAP (&spill_pseudos_bitmap, 0, spill_regno, bi) EXECUTE_IF_SET_IN_BITMAP (&spill_pseudos_bitmap, 0, spill_regno, bi)
{ {
update_lives (spill_regno, true); update_lives (spill_regno, true);
......
...@@ -821,6 +821,11 @@ DEFPARAM (PARAM_IRA_LOOP_RESERVED_REGS, ...@@ -821,6 +821,11 @@ DEFPARAM (PARAM_IRA_LOOP_RESERVED_REGS,
"The number of registers in each class kept unused by loop invariant motion", "The number of registers in each class kept unused by loop invariant motion",
2, 0, 0) 2, 0, 0)
DEFPARAM (PARAM_LRA_MAX_CONSIDERED_RELOAD_PSEUDOS,
"lra-max-considered-reload-pseudos",
"The max number of reload pseudos which are considered during spilling a non-reload pseudo",
500, 0, 0)
/* Switch initialization conversion will refuse to create arrays that are /* Switch initialization conversion will refuse to create arrays that are
bigger than this parameter times the number of switch branches. */ bigger than this parameter times the number of switch branches. */
......
...@@ -196,6 +196,8 @@ extern void init_param_values (int *params); ...@@ -196,6 +196,8 @@ extern void init_param_values (int *params);
PARAM_VALUE (PARAM_IRA_MAX_CONFLICT_TABLE_SIZE) PARAM_VALUE (PARAM_IRA_MAX_CONFLICT_TABLE_SIZE)
#define IRA_LOOP_RESERVED_REGS \ #define IRA_LOOP_RESERVED_REGS \
PARAM_VALUE (PARAM_IRA_LOOP_RESERVED_REGS) PARAM_VALUE (PARAM_IRA_LOOP_RESERVED_REGS)
#define LRA_MAX_CONSIDERED_RELOAD_PSEUDOS \
PARAM_VALUE (PARAM_LRA_MAX_CONSIDERED_RELOAD_PSEUDOS)
#define SWITCH_CONVERSION_BRANCH_RATIO \ #define SWITCH_CONVERSION_BRANCH_RATIO \
PARAM_VALUE (PARAM_SWITCH_CONVERSION_BRANCH_RATIO) PARAM_VALUE (PARAM_SWITCH_CONVERSION_BRANCH_RATIO)
#define LOOP_INVARIANT_MAX_BBS_IN_LOOP \ #define LOOP_INVARIANT_MAX_BBS_IN_LOOP \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment