From 89159e310d2cba7154693b659c2ee82a5f7fd16a Mon Sep 17 00:00:00 2001 From: jakub Date: Tue, 3 Jan 2012 20:57:29 +0000 Subject: [PATCH] PR bootstrap/51725 * cselib.c (new_elt_loc_list): When moving locs from one cselib_val to its new canonical_cselib_val and the cselib_val was in first_containing_mem chain, but the canonical_cselib_val was not, add the latter into the chain. (cselib_invalidate_mem): Compare canonical_cselib_val of addr_list chain elt with v. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182858 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 9 +++++++++ gcc/cselib.c | 8 +++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e5f0b66346d..b4c5fa1cf57 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,14 @@ 2012-01-03 Jakub Jelinek + PR bootstrap/51725 + * cselib.c (new_elt_loc_list): When moving locs from one + cselib_val to its new canonical_cselib_val and the + cselib_val was in first_containing_mem chain, but + the canonical_cselib_val was not, add the latter into the + chain. + (cselib_invalidate_mem): Compare canonical_cselib_val of + addr_list chain elt with v. + PR pch/51722 * dwarf2out.c (dwarf2out_start_source_file, dwarf2out_define, dwarf2out_undef): Allocate e.info using ggc_strdup instead diff --git a/gcc/cselib.c b/gcc/cselib.c index fc86ef1affe..9934abb8f41 100644 --- a/gcc/cselib.c +++ b/gcc/cselib.c @@ -277,6 +277,12 @@ new_elt_loc_list (cselib_val *val, rtx loc) } el->next = val->locs; next = val->locs = CSELIB_VAL_PTR (loc)->locs; + if (CSELIB_VAL_PTR (loc)->next_containing_mem != NULL + && val->next_containing_mem == NULL) + { + val->next_containing_mem = first_containing_mem; + first_containing_mem = val; + } } /* Chain LOC back to VAL. */ @@ -2211,7 +2217,7 @@ cselib_invalidate_mem (rtx mem_rtx) mem_chain = &addr->addr_list; for (;;) { - if ((*mem_chain)->elt == v) + if (canonical_cselib_val ((*mem_chain)->elt) == v) { unchain_one_elt_list (mem_chain); break; -- 2.11.0