Commit 37f6a157 by Richard Biener Committed by Richard Biener

re PR tree-optimization/77839 (Memory- and compile time hog at -O1 and above)

2016-10-06  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/77839
	* tree-ssa-sccvn.c (set_ssa_val_to): Forbid value -> constant value
	lattice transition.

	* gcc.dg/torture/pr77839.c: New testcase.

From-SVN: r240829
parent 2d5edbed
2016-10-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/77839
* tree-ssa-sccvn.c (set_ssa_val_to): Forbid value -> constant value
lattice transition.
2016-10-06 Martin Liska <mliska@suse.cz> 2016-10-06 Martin Liska <mliska@suse.cz>
* gcc.c: Set -fprofile-update=atomic when profiling is * gcc.c: Set -fprofile-update=atomic when profiling is
......
2016-10-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/77839
* gcc.dg/torture/pr77839.c: New testcase.
2016-10-06 Marek Polacek <polacek@redhat.com> 2016-10-06 Marek Polacek <polacek@redhat.com>
* g++.dg/cpp1z/init-statement9.C: New test. * g++.dg/cpp1z/init-statement9.C: New test.
......
/* { dg-do compile } */
void
sd(int yn)
{
while (yn < 1)
{
int hy;
int *n6 = &hy;
int **ot = &n6;
(void)ot;
for (yn = 0; yn < 1; ++yn)
{
int tc, wo = 0, ez = 0, b8 = 0;
int *ls = &wo;
(void)ls;
hy = 0;
for (tc = 0; tc < 1; ++tc)
{
ez ^= hy;
wo ^= ez;
++b8;
}
hy += (b8 < wo);
}
}
}
...@@ -3260,6 +3260,23 @@ set_ssa_val_to (tree from, tree to) ...@@ -3260,6 +3260,23 @@ set_ssa_val_to (tree from, tree to)
} }
return false; return false;
} }
else if (currval != VN_TOP
&& ! is_gimple_min_invariant (currval)
&& is_gimple_min_invariant (to))
{
if (dump_file && (dump_flags & TDF_DETAILS))
{
fprintf (dump_file, "Forcing VARYING instead of changing "
"value number of ");
print_generic_expr (dump_file, from, 0);
fprintf (dump_file, " from ");
print_generic_expr (dump_file, currval, 0);
fprintf (dump_file, " (non-constant) to ");
print_generic_expr (dump_file, to, 0);
fprintf (dump_file, " (constant)\n");
}
to = from;
}
else if (TREE_CODE (to) == SSA_NAME else if (TREE_CODE (to) == SSA_NAME
&& SSA_NAME_OCCURS_IN_ABNORMAL_PHI (to)) && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (to))
to = from; to = from;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment