Commit a812fb07 by Vladimir Makarov Committed by Vladimir Makarov

re PR debug/39432 (gdb.base/store.exp failures)

2009-03-12  Vladimir Makarov  <vmakarov@redhat.com>

	PR debug/39432
	* ira-int.h (struct allocno): Fix comment for calls_crossed_num.
	* ira-conflicts.c (ira_build_conflicts): Prohibit call used
	registers for allocnos created from user-defined variables.

From-SVN: r144812
parent 4caab5ba
2009-03-12 Vladimir Makarov <vmakarov@redhat.com>
PR debug/39432
* ira-int.h (struct allocno): Fix comment for calls_crossed_num.
* ira-conflicts.c (ira_build_conflicts): Prohibit call used
registers for allocnos created from user-defined variables.
2009-03-11 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> 2009-03-11 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
PR target/39181 PR target/39181
......
...@@ -800,31 +800,35 @@ ira_build_conflicts (void) ...@@ -800,31 +800,35 @@ ira_build_conflicts (void)
} }
FOR_EACH_ALLOCNO (a, ai) FOR_EACH_ALLOCNO (a, ai)
{ {
if (ALLOCNO_CALLS_CROSSED_NUM (a) == 0) reg_attrs *attrs;
continue; tree decl;
if (! flag_caller_saves)
if ((! flag_caller_saves && ALLOCNO_CALLS_CROSSED_NUM (a) != 0)
/* For debugging purposes don't put user defined variables in
callee-clobbered registers. */
|| (optimize <= 1
&& (attrs = REG_ATTRS (regno_reg_rtx [ALLOCNO_REGNO (a)])) != NULL
&& (decl = attrs->decl) != NULL
&& VAR_OR_FUNCTION_DECL_P (decl)
&& ! DECL_ARTIFICIAL (decl)))
{ {
IOR_HARD_REG_SET (ALLOCNO_TOTAL_CONFLICT_HARD_REGS (a), IOR_HARD_REG_SET (ALLOCNO_TOTAL_CONFLICT_HARD_REGS (a),
call_used_reg_set); call_used_reg_set);
if (ALLOCNO_CALLS_CROSSED_NUM (a) != 0)
IOR_HARD_REG_SET (ALLOCNO_CONFLICT_HARD_REGS (a), IOR_HARD_REG_SET (ALLOCNO_CONFLICT_HARD_REGS (a),
call_used_reg_set); call_used_reg_set);
} }
else else if (ALLOCNO_CALLS_CROSSED_NUM (a) != 0)
{ {
IOR_HARD_REG_SET (ALLOCNO_TOTAL_CONFLICT_HARD_REGS (a), IOR_HARD_REG_SET (ALLOCNO_TOTAL_CONFLICT_HARD_REGS (a),
no_caller_save_reg_set); no_caller_save_reg_set);
IOR_HARD_REG_SET (ALLOCNO_TOTAL_CONFLICT_HARD_REGS (a), IOR_HARD_REG_SET (ALLOCNO_TOTAL_CONFLICT_HARD_REGS (a),
temp_hard_reg_set); temp_hard_reg_set);
if (ALLOCNO_CALLS_CROSSED_NUM (a) != 0)
{
IOR_HARD_REG_SET (ALLOCNO_CONFLICT_HARD_REGS (a), IOR_HARD_REG_SET (ALLOCNO_CONFLICT_HARD_REGS (a),
no_caller_save_reg_set); no_caller_save_reg_set);
IOR_HARD_REG_SET (ALLOCNO_CONFLICT_HARD_REGS (a), IOR_HARD_REG_SET (ALLOCNO_CONFLICT_HARD_REGS (a),
temp_hard_reg_set); temp_hard_reg_set);
} }
} }
}
if (optimize && ira_conflicts_p if (optimize && ira_conflicts_p
&& internal_flag_ira_verbose > 2 && ira_dump_file != NULL) && internal_flag_ira_verbose > 2 && ira_dump_file != NULL)
print_conflicts (ira_dump_file, false); print_conflicts (ira_dump_file, false);
......
...@@ -333,7 +333,7 @@ struct ira_allocno ...@@ -333,7 +333,7 @@ struct ira_allocno
/* Accumulated frequency of calls which given allocno /* Accumulated frequency of calls which given allocno
intersects. */ intersects. */
int call_freq; int call_freq;
/* Length of the previous array (number of the intersected calls). */ /* Accumulated number of the intersected calls. */
int calls_crossed_num; int calls_crossed_num;
/* Non NULL if we remove restoring value from given allocno to /* Non NULL if we remove restoring value from given allocno to
MEM_OPTIMIZED_DEST at loop exit (see ira-emit.c) because the MEM_OPTIMIZED_DEST at loop exit (see ira-emit.c) because the
......
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