From 47f6add2ea4f4bc1b9e7bcc817dad9b903568f18 Mon Sep 17 00:00:00 2001 From: vmakarov Date: Fri, 21 Dec 2012 21:20:48 +0000 Subject: 2012-12-21 Vladimir Makarov PR middle-end/55775 * lra-assigns.c (improve_inheritance): Do nothing after LRA_MAX_INHERITANCE_PASSES pass. * lra-constraints.c (MAX_CONSTRAINT_ITERATION_NUMBER): Rename to LRA_MAX_CONSTRAINT_ITERATION_NUMBER. Move to lra-int.h. (MAX_INHERITANCE_PASSES): Rename to LRA_MAX_INHERITANCE_PASSES. Move to lra-int.h. * lra-int.h (LRA_MAX_CONSTRAINT_ITERATION_NUMBER): Move from lra-constraints.c. (LRA_MAX_INHERITANCE_PASSES): Ditto. 2012-12-21 Vladimir Makarov PR middle-end/55775 * gcc.target/i386/pr55775.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194680 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/lra-constraints.c | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) (limited to 'gcc/lra-constraints.c') diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index e4c9ca2a5e8..f6c6c89b858 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -3201,10 +3201,6 @@ loc_equivalence_callback (rtx loc, const_rtx, void *) return NULL_RTX; } -/* Maximum allowed number of constraint pass iterations after the last - spill pass. It is for preventing LRA cycling in a bug case. */ -#define MAX_CONSTRAINT_ITERATION_NUMBER 30 - /* Maximum number of generated reload insns per an insn. It is for preventing this pass cycling in a bug case. */ #define MAX_RELOAD_INSNS_NUMBER LRA_MAX_INSN_RELOADS @@ -3328,10 +3324,10 @@ lra_constraints (bool first_p) fprintf (lra_dump_file, "\n********** Local #%d: **********\n\n", lra_constraint_iter); lra_constraint_iter_after_spill++; - if (lra_constraint_iter_after_spill > MAX_CONSTRAINT_ITERATION_NUMBER) + if (lra_constraint_iter_after_spill > LRA_MAX_CONSTRAINT_ITERATION_NUMBER) internal_error ("Maximum number of LRA constraint passes is achieved (%d)\n", - MAX_CONSTRAINT_ITERATION_NUMBER); + LRA_MAX_CONSTRAINT_ITERATION_NUMBER); changed_p = false; lra_risky_transformations_p = false; new_insn_uid_start = get_max_uid (); @@ -4698,21 +4694,6 @@ inherit_in_ebb (rtx head, rtx tail) return change_p; } -/* The maximal number of inheritance/split passes in LRA. It should - be more 1 in order to perform caller saves transformations and much - less MAX_CONSTRAINT_ITERATION_NUMBER to prevent LRA to do as many - as permitted constraint passes in some complicated cases. The - first inheritance/split pass has a biggest impact on generated code - quality. Each subsequent affects generated code in less degree. - For example, the 3rd pass does not change generated SPEC2000 code - at all on x86-64. */ -#define MAX_INHERITANCE_PASSES 2 - -#if MAX_INHERITANCE_PASSES <= 0 \ - || MAX_INHERITANCE_PASSES >= MAX_CONSTRAINT_ITERATION_NUMBER - 8 -#error wrong MAX_INHERITANCE_PASSES value -#endif - /* This value affects EBB forming. If probability of edge from EBB to a BB is not greater than the following value, we don't add the BB to EBB. */ @@ -4730,7 +4711,7 @@ lra_inheritance (void) edge e; lra_inheritance_iter++; - if (lra_inheritance_iter > MAX_INHERITANCE_PASSES) + if (lra_inheritance_iter > LRA_MAX_INHERITANCE_PASSES) return; timevar_push (TV_LRA_INHERITANCE); if (lra_dump_file != NULL) @@ -5000,7 +4981,7 @@ lra_undo_inheritance (void) bool change_p; lra_undo_inheritance_iter++; - if (lra_undo_inheritance_iter > MAX_INHERITANCE_PASSES) + if (lra_undo_inheritance_iter > LRA_MAX_INHERITANCE_PASSES) return false; if (lra_dump_file != NULL) fprintf (lra_dump_file, -- cgit v1.2.1