Commit d155c6fe by Jeff Law Committed by Jeff Law

re PR tree-optimization/33562 (aggregate DSE disabled)

        PR tree-optimization/33562
        PR tree-optimization/61912
        PR tree-optimization/77485
	* doc/invoke.texi: Document new dse-max-object-size param.
	* params.def (PARM_DSE_MAX_OBJECT_SIZE): New PARAM.
	* tree-ssa-dse.c: Include params.h.
	(dse_store_status): New enum.
	(initialize_ao_ref_for_dse): New, partially extracted from
	dse_optimize_stmt.
	(valid_ao_ref_for_dse, normalize_ref): New.
	(setup_live_bytes_from_ref, compute_trims): Likewise.
	(clear_bytes_written_by, maybe_trim_complex_store): Likewise.
	(maybe_trim_partially_dead_store): Likewise.
	(maybe_trim_complex_store): Likewise.
	(dse_classify_store): Renamed from dse_possibly_dead_store_p.
	Track what bytes live from the original store.  Return tri-state
	for dead, partially dead or live.
	(dse_dom_walker): Add constructor, destructor and new private members.
	(delete_dead_call, delete_dead_assignment): New extracted from
	dse_optimize_stmt.
	(dse_optimize_stmt): Make a member of dse_dom_walker.
	Use initialize_ao_ref_for_dse.

        PR tree-optimization/33562
        PR tree-optimization/61912
        PR tree-optimization/77485
	* gcc.dg/tree-ssa/complex-4.c: Remove xfail.
	* gcc.dg/tree-ssa/complex-5.c: Likewise.
	* gcc.dg/tree-ssa/ssa-dse-9.c: Likewise.
	* gcc.dg/tree-ssa/ssa-dse-18.c: New test.
	* gcc.dg/tree-ssa/ssa-dse-19.c: Likewise.
	* gcc.dg/tree-ssa/ssa-dse-20.c: Likewise.
	* gcc.dg/tree-ssa/ssa-dse-21.c: Likewise.

From-SVN: r244442
parent 68b36e59
2017-01-13 Jeff Law <law@redhat.com> 2017-01-13 Jeff Law <law@redhat.com>
PR tree-optimization/33562
PR tree-optimization/61912
PR tree-optimization/77485
* doc/invoke.texi: Document new dse-max-object-size param.
* params.def (PARM_DSE_MAX_OBJECT_SIZE): New PARAM.
* tree-ssa-dse.c: Include params.h.
(dse_store_status): New enum.
(initialize_ao_ref_for_dse): New, partially extracted from
dse_optimize_stmt.
(valid_ao_ref_for_dse, normalize_ref): New.
(setup_live_bytes_from_ref, compute_trims): Likewise.
(clear_bytes_written_by, maybe_trim_complex_store): Likewise.
(maybe_trim_partially_dead_store): Likewise.
(maybe_trim_complex_store): Likewise.
(dse_classify_store): Renamed from dse_possibly_dead_store_p.
Track what bytes live from the original store. Return tri-state
for dead, partially dead or live.
(dse_dom_walker): Add constructor, destructor and new private members.
(delete_dead_call, delete_dead_assignment): New extracted from
dse_optimize_stmt.
(dse_optimize_stmt): Make a member of dse_dom_walker.
Use initialize_ao_ref_for_dse.
PR tree-optimization/33562 PR tree-optimization/33562
PR tree-optimization/61912 PR tree-optimization/61912
PR tree-optimization/77485 PR tree-optimization/77485
......
...@@ -9880,6 +9880,10 @@ when adding a new one. ...@@ -9880,6 +9880,10 @@ when adding a new one.
@item avg-loop-niter @item avg-loop-niter
Average number of iterations of a loop. Average number of iterations of a loop.
@item dse-max-object-size
Maximum size (in bytes) of objects tracked bytewise by dead store elimination.
Larger values may result in larger compilation times.
@item scev-max-expr-size @item scev-max-expr-size
Bound on size of expressions used in the scalar evolutions analyzer. Bound on size of expressions used in the scalar evolutions analyzer.
Large expressions slow the analyzer. Large expressions slow the analyzer.
......
...@@ -532,6 +532,11 @@ DEFPARAM(PARAM_AVG_LOOP_NITER, ...@@ -532,6 +532,11 @@ DEFPARAM(PARAM_AVG_LOOP_NITER,
"Average number of iterations of a loop.", "Average number of iterations of a loop.",
10, 1, 0) 10, 1, 0)
DEFPARAM(PARAM_DSE_MAX_OBJECT_SIZE,
"dse-max-object-size",
"Maximum size (in bytes) of objects tracked bytewise by dead store elimination.",
256, 0, 0)
DEFPARAM(PARAM_SCEV_MAX_EXPR_SIZE, DEFPARAM(PARAM_SCEV_MAX_EXPR_SIZE,
"scev-max-expr-size", "scev-max-expr-size",
"Bound on size of expressions used in the scalar evolutions analyzer.", "Bound on size of expressions used in the scalar evolutions analyzer.",
......
2017-01-13 Jeff Law <law@redhat.com>
PR tree-optimization/33562
PR tree-optimization/61912
PR tree-optimization/77485
* gcc.dg/tree-ssa/complex-4.c: Remove xfail.
* gcc.dg/tree-ssa/complex-5.c: Likewise.
* gcc.dg/tree-ssa/ssa-dse-9.c: Likewise.
* gcc.dg/tree-ssa/ssa-dse-18.c: New test.
* gcc.dg/tree-ssa/ssa-dse-19.c: Likewise.
* gcc.dg/tree-ssa/ssa-dse-20.c: Likewise.
* gcc.dg/tree-ssa/ssa-dse-21.c: Likewise.
2017-01-13 Martin Liska <mliska@suse.cz> 2017-01-13 Martin Liska <mliska@suse.cz>
PR ipa/79043 PR ipa/79043
......
...@@ -10,4 +10,4 @@ int f(void) ...@@ -10,4 +10,4 @@ int f(void)
return g(&t); return g(&t);
} }
/* { dg-final { scan-tree-dump-times "__complex__" 0 "optimized" { xfail *-*-* } } } */ /* { dg-final { scan-tree-dump-times "__complex__" 0 "optimized" } } */
...@@ -8,4 +8,4 @@ int f(void) ...@@ -8,4 +8,4 @@ int f(void)
__imag__ t = 2; __imag__ t = 2;
} }
/* { dg-final { scan-tree-dump-times "__complex__" 0 "optimized" { xfail *-*-* } } } */ /* { dg-final { scan-tree-dump-times "__complex__" 0 "optimized" } } */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
int g(_Complex int*);
int f(void)
{
_Complex int t = 0;
int i, j;
__imag__ t += 2;
return g(&t);
}
/* { dg-final { scan-tree-dump-times "__complex__" 0 "optimized" } } */
/* { dg-final { scan-tree-dump-times "REALPART_EXPR" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "IMAGPART_EXPR" 1 "optimized" } } */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
int g(_Complex int*);
int f(void)
{
_Complex int t = 0;
int i, j;
__real__ t += 2;
return g(&t);
}
/* { dg-final { scan-tree-dump-times "__complex__" 0 "optimized" } } */
/* { dg-final { scan-tree-dump-times "REALPART_EXPR" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "IMAGPART_EXPR" 1 "optimized" } } */
/* { dg-do compile } */
/* { dg-options "-O1 -fno-tree-dce -fdump-tree-optimized" } */
_Complex int t = 0;
int f(void)
{
t = 0;
__imag__ t = 2;
}
/* { dg-final { scan-tree-dump-times "__complex__" 0 "optimized" } } */
/* { dg-final { scan-tree-dump-times "REALPART_EXPR" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "IMAGPART_EXPR" 1 "optimized" } } */
/* { dg-do compile } */
/* { dg-options "-O1 -fno-tree-dce -fdump-tree-optimized" } */
_Complex int t = 0;
int f(void)
{
t = 0;
__real__ t = 2;
}
/* { dg-final { scan-tree-dump-times "__complex__" 0 "optimized" } } */
/* { dg-final { scan-tree-dump-times "REALPART_EXPR" 1 "optimized" } } */
/* { dg-final { scan-tree-dump-times "IMAGPART_EXPR" 1 "optimized" } } */
...@@ -11,4 +11,4 @@ foo () ...@@ -11,4 +11,4 @@ foo ()
} }
/* We should eliminate the first assignment. */ /* We should eliminate the first assignment. */
/* { dg-final { scan-tree-dump-times "VDEF" 2 "dse1" { xfail *-*-* } } } */ /* { dg-final { scan-tree-dump-times "VDEF" 2 "dse1" } } */
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