This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix PR58656
- From: Richard Biener <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 10 Oct 2013 16:04:38 +0200 (CEST)
- Subject: [PATCH] Fix PR58656
- Authentication-results: sourceware.org; auth=none
This fixes an unintended side-effect of the PR58464 fix, caching
failed translations has issues with insertion iteration.
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.
Richard.
2013-10-10 Richard Biener <rguenther@suse.de>
PR tree-optimization/58656
* tree-ssa-pre.c (phi_translate): Do not cache failed
translations.
Index: gcc/tree-ssa-pre.c
===================================================================
*** gcc/tree-ssa-pre.c (revision 203356)
--- gcc/tree-ssa-pre.c (working copy)
*************** phi_translate (pre_expr expr, bitmap_set
*** 1758,1764 ****
phitrans = phi_translate_1 (expr, set1, set2, pred, phiblock);
if (slot)
! slot->v = phitrans;
return phitrans;
}
--- 1758,1771 ----
phitrans = phi_translate_1 (expr, set1, set2, pred, phiblock);
if (slot)
! {
! if (phitrans)
! slot->v = phitrans;
! else
! /* Remove failed translations again, they cause insert
! iteration to not pick up new opportunities reliably. */
! phi_translate_table.remove_elt_with_hash (slot, slot->hashcode);
! }
return phitrans;
}