re PR tree-optimization/90316 (large compile time increase in opt / alias stmt walking for Go example)

2019-05-07  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/90316
	* tree-ssa-pre.c (translate_vuse_through_block): When
	same_valid is NULL do not bother to search for a virtual
	PHI continuation.
	(phi_translate_1): When operands changed we cannot keep
	the same value-number so do not bother to ask whether
	that's possible from translate_vuse_through_block.

From-SVN: r270944
This commit is contained in:
Richard Biener 2019-05-07 13:03:19 +00:00 committed by Richard Biener
parent d7b6aee8cd
commit 530ec1aceb
2 changed files with 18 additions and 10 deletions

View File

@ -1,3 +1,13 @@
2019-05-07 Richard Biener <rguenther@suse.de>
PR tree-optimization/90316
* tree-ssa-pre.c (translate_vuse_through_block): When
same_valid is NULL do not bother to search for a virtual
PHI continuation.
(phi_translate_1): When operands changed we cannot keep
the same value-number so do not bother to ask whether
that's possible from translate_vuse_through_block.
2019-05-07 Martin Liska <mliska@suse.cz> 2019-05-07 Martin Liska <mliska@suse.cz>
* bitmap.c (bitmap_register): Come up with * bitmap.c (bitmap_register): Come up with

View File

@ -1146,7 +1146,8 @@ translate_vuse_through_block (vec<vn_reference_op_s> operands,
edge e = NULL; edge e = NULL;
bool use_oracle; bool use_oracle;
*same_valid = true; if (same_valid)
*same_valid = true;
if (gimple_bb (phi) != phiblock) if (gimple_bb (phi) != phiblock)
return vuse; return vuse;
@ -1179,7 +1180,7 @@ translate_vuse_through_block (vec<vn_reference_op_s> operands,
if (e) if (e)
{ {
if (use_oracle) if (use_oracle && same_valid)
{ {
bitmap visited = NULL; bitmap visited = NULL;
/* Try to find a vuse that dominates this phi node by skipping /* Try to find a vuse that dominates this phi node by skipping
@ -1191,13 +1192,9 @@ translate_vuse_through_block (vec<vn_reference_op_s> operands,
} }
else else
vuse = NULL_TREE; vuse = NULL_TREE;
if (!vuse) /* If we didn't find any, the value ID can't stay the same. */
{ if (!vuse && same_valid)
/* If we didn't find any, the value ID can't stay the same, *same_valid = false;
but return the translated vuse. */
*same_valid = false;
vuse = PHI_ARG_DEF (phi, e->dest_idx);
}
/* ??? We would like to return vuse here as this is the canonical /* ??? We would like to return vuse here as this is the canonical
upmost vdef that this reference is associated with. But during upmost vdef that this reference is associated with. But during
insertion of the references into the hash tables we only ever insertion of the references into the hash tables we only ever
@ -1535,7 +1532,8 @@ phi_translate_1 (bitmap_set_t dest,
? newoperands : operands, ? newoperands : operands,
ref->set, ref->type, ref->set, ref->type,
vuse, phiblock, pred, vuse, phiblock, pred,
&same_valid); changed
? NULL : &same_valid);
if (newvuse == NULL_TREE) if (newvuse == NULL_TREE)
{ {
newoperands.release (); newoperands.release ();