From a812fb0792e401759f58c48482d43d4534cb178a Mon Sep 17 00:00:00 2001 From: Vladimir Makarov Date: Thu, 12 Mar 2009 14:39:55 +0000 Subject: re PR debug/39432 (gdb.base/store.exp failures) 2009-03-12 Vladimir Makarov 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 --- gcc/ira-conflicts.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'gcc/ira-conflicts.c') diff --git a/gcc/ira-conflicts.c b/gcc/ira-conflicts.c index b5537bf..05870ab 100644 --- a/gcc/ira-conflicts.c +++ b/gcc/ira-conflicts.c @@ -800,29 +800,33 @@ ira_build_conflicts (void) } FOR_EACH_ALLOCNO (a, ai) { - if (ALLOCNO_CALLS_CROSSED_NUM (a) == 0) - continue; - if (! flag_caller_saves) + reg_attrs *attrs; + tree decl; + + 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), call_used_reg_set); - if (ALLOCNO_CALLS_CROSSED_NUM (a) != 0) - IOR_HARD_REG_SET (ALLOCNO_CONFLICT_HARD_REGS (a), - call_used_reg_set); + IOR_HARD_REG_SET (ALLOCNO_CONFLICT_HARD_REGS (a), + call_used_reg_set); } - else + else if (ALLOCNO_CALLS_CROSSED_NUM (a) != 0) { IOR_HARD_REG_SET (ALLOCNO_TOTAL_CONFLICT_HARD_REGS (a), no_caller_save_reg_set); IOR_HARD_REG_SET (ALLOCNO_TOTAL_CONFLICT_HARD_REGS (a), temp_hard_reg_set); - if (ALLOCNO_CALLS_CROSSED_NUM (a) != 0) - { - IOR_HARD_REG_SET (ALLOCNO_CONFLICT_HARD_REGS (a), - no_caller_save_reg_set); - IOR_HARD_REG_SET (ALLOCNO_CONFLICT_HARD_REGS (a), - temp_hard_reg_set); - } + IOR_HARD_REG_SET (ALLOCNO_CONFLICT_HARD_REGS (a), + no_caller_save_reg_set); + IOR_HARD_REG_SET (ALLOCNO_CONFLICT_HARD_REGS (a), + temp_hard_reg_set); } } if (optimize && ira_conflicts_p -- cgit v1.1