diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2011-10-26 13:47:48 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2011-10-26 13:47:48 +0000 |
commit | bfd5f9f59dc139568b3c205b7452a68cd8392d05 (patch) | |
tree | e82c87dcd74f1774911e079c54c2deb258e25ca0 /gcc | |
parent | 1cc17820c32e8b9886100466bc7ac9ff235b254a (diff) | |
download | gcc-bfd5f9f59dc139568b3c205b7452a68cd8392d05.zip gcc-bfd5f9f59dc139568b3c205b7452a68cd8392d05.tar.gz gcc-bfd5f9f59dc139568b3c205b7452a68cd8392d05.tar.bz2 |
re PR debug/50826 (bootstrap on 64 bit pa broken by r180194, ICE in mem_loc_descriptor)
PR debug/50826
* var-tracking.c (rtx_debug_expr_p): New.
(use_type): Don't use debug exprs to track non-VTA variables.
From-SVN: r180525
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/var-tracking.c | 20 |
2 files changed, 25 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index af5a87d..6d48ccd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-10-26 Alexandre Oliva <aoliva@redhat.com> + + PR debug/50826 + * var-tracking.c (rtx_debug_expr_p): New. + (use_type): Don't use debug exprs to track non-VTA variables. + 2011-10-26 Jeff Law <law@redhat.com> * doc/invoke.texi (sink-frequency-threshold): Document. diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index 8a64000..44bab38 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -4907,6 +4907,18 @@ replace_expr_with_values (rtx loc) return cselib_subst_to_values (loc, VOIDmode); } +/* Return true if *X is a DEBUG_EXPR. Usable as an argument to + for_each_rtx to tell whether there are any DEBUG_EXPRs within + RTX. */ + +static int +rtx_debug_expr_p (rtx *x, void *data ATTRIBUTE_UNUSED) +{ + rtx loc = *x; + + return GET_CODE (loc) == DEBUG_EXPR; +} + /* Determine what kind of micro operation to choose for a USE. Return MO_CLOBBER if no micro operation is to be generated. */ @@ -4988,7 +5000,13 @@ use_type (rtx loc, struct count_use_info *cui, enum machine_mode *modep) else if (target_for_debug_bind (var_debug_decl (expr))) return MO_CLOBBER; else if (track_loc_p (loc, expr, INT_MEM_OFFSET (loc), - false, modep, NULL)) + false, modep, NULL) + /* Multi-part variables shouldn't refer to one-part + variable names such as VALUEs (never happens) or + DEBUG_EXPRs (only happens in the presence of debug + insns). */ + && (!MAY_HAVE_DEBUG_INSNS + || !for_each_rtx (&XEXP (loc, 0), rtx_debug_expr_p, NULL))) return MO_USE; else return MO_CLOBBER; |