Commit c4ab2baa by Richard Guenther Committed by Richard Biener

tree-vrp.c (found_in_subgraph): Remove.

2008-08-20  Richard Guenther  <rguenther@suse.de>

	* tree-vrp.c (found_in_subgraph): Remove.
	(live): New global static.
	(live_on_edge): New function.
	(blocks_visited): Remove.
	(register_edge_assert_for_2): Use live_on_edge.
	(find_conditional_asserts): Remove code dealing with
	found_in_subgraph.  Do not walk the CFG.
	(find_switch_asserts): Likewise.
	(find_assert_locations_1): Renamed from find_assert_locations.
	Move finding assert locations for conditional and switch
	statements first.  Update live bitmap.  Do not walk the CFG.
	(find_assert_locations): New function.
	(insert_range_assertions): Remove entry of CFG walk.
	Adjust call to find_assert_locations.
	* tree-ssa-pre.c (do_regular_insertion): Ignore critical edges
	that only can appear because of fake exit edges but assert we
	never try to insert on those.
	(fini_pre): Do not remove fake exit edges here...
	(execute_pre): ...but here, before committing edge inserts.

	* gcc.dg/tree-ssa/pr20701.c: Scan vrp1 dump.
	* gcc.dg/tree-ssa/ssa-dom-thread-1.c: Pass -fno-tree-vrp.
	* gcc.dg/tree-ssa/ssa-pre-20.c: New testcase.

From-SVN: r139263
parent 6c7c31a6
2008-08-20 Richard Guenther <rguenther@suse.de>
* tree-vrp.c (found_in_subgraph): Remove.
(live): New global static.
(live_on_edge): New function.
(blocks_visited): Remove.
(register_edge_assert_for_2): Use live_on_edge.
(find_conditional_asserts): Remove code dealing with
found_in_subgraph. Do not walk the CFG.
(find_switch_asserts): Likewise.
(find_assert_locations_1): Renamed from find_assert_locations.
Move finding assert locations for conditional and switch
statements first. Update live bitmap. Do not walk the CFG.
(find_assert_locations): New function.
(insert_range_assertions): Remove entry of CFG walk.
Adjust call to find_assert_locations.
* tree-ssa-pre.c (do_regular_insertion): Ignore critical edges
that only can appear because of fake exit edges but assert we
never try to insert on those.
(fini_pre): Do not remove fake exit edges here...
(execute_pre): ...but here, before committing edge inserts.
2008-08-19 Richard Guenther <rguenther@suse.de>
* passes.c (init_optimization_passes): Exchange store-ccp
......
2008-08-20 Richard Guenther <rguenther@suse.de>
* gcc.dg/tree-ssa/pr20701.c: Scan vrp1 dump.
* gcc.dg/tree-ssa/ssa-dom-thread-1.c: Pass -fno-tree-vrp.
* gcc.dg/tree-ssa/ssa-pre-20.c: New testcase.
2008-08-19 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
* gcc.dg/torture/fp-int-convert-float.c: Reenable test on SPU.
......
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-vrp2 -fno-early-inlining" } */
/* { dg-options "-O2 -fdump-tree-vrp1 -fno-early-inlining" } */
typedef struct {
int code;
......@@ -36,6 +36,6 @@ can_combine_p (rtx insn, rtx elt)
}
/* Target with fno-delete-null-pointer-checks should not fold checks */
/* { dg-final { scan-tree-dump-times "Folding predicate.*to 0" 1 "vrp2" { target { ! keeps_null_pointer_checks } } } } */
/* { dg-final { scan-tree-dump-times "Folding predicate.*to 0" 0 "vrp2" { target { keeps_null_pointer_checks } } } } */
/* { dg-final { cleanup-tree-dump "vrp2" } } */
/* { dg-final { scan-tree-dump-times "Folding predicate.*to 0" 1 "vrp1" { target { ! keeps_null_pointer_checks } } } } */
/* { dg-final { scan-tree-dump-times "Folding predicate.*to 0" 0 "vrp1" { target { keeps_null_pointer_checks } } } } */
/* { dg-final { cleanup-tree-dump "vrp1" } } */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-dom1-details" } */
/* { dg-options "-O2 -fno-tree-vrp -fdump-tree-dom1-details" } */
void t(void);
void q(void);
void q1(void);
......
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-pre-stats" } */
double pcheck;
void foo(int n, int m, int b)
{
int i, j;
goto bb18;
start:
i = 1;
do {
j = 1;
do {
double x = pcheck;
x = x + 1;
pcheck = x;
j = j + 1;
} while (j != m);
i = i + 1;
} while (i != n);
bb18:
pcheck = 0.0;
goto start;
}
/* We should have inserted two PHI nodes and the one in the i-loop
should have 0.0 in the argument coming from the bb18 block. */
/* { dg-final { scan-tree-dump "New PHIs: 2" "pre" } } */
/* { dg-final { scan-tree-dump "PHI <.*0\\\.0" "pre" } } */
/* { dg-final { cleanup-tree-dump "pre" } } */
......@@ -3160,14 +3160,9 @@ do_regular_insertion (basic_block block, basic_block dom)
{
unsigned int vprime;
/* This can happen in the very weird case
that our fake infinite loop edges have caused a
critical edge to appear. */
if (EDGE_CRITICAL_P (pred))
{
cant_insert = true;
break;
}
/* We should never run insertion for the exit block
and so not come across fake pred edges. */
gcc_assert (!(pred->flags & EDGE_FAKE));
bprime = pred->src;
eprime = phi_translate (expr, ANTIC_IN (block), NULL,
bprime, block);
......@@ -3299,14 +3294,9 @@ do_partial_partial_insertion (basic_block block, basic_block dom)
unsigned int vprime;
pre_expr edoubleprime;
/* This can happen in the very weird case
that our fake infinite loop edges have caused a
critical edge to appear. */
if (EDGE_CRITICAL_P (pred))
{
cant_insert = true;
break;
}
/* We should never run insertion for the exit block
and so not come across fake pred edges. */
gcc_assert (!(pred->flags & EDGE_FAKE));
bprime = pred->src;
eprime = phi_translate (expr, ANTIC_IN (block),
PA_IN (block),
......@@ -4117,7 +4107,6 @@ fini_pre (bool do_fre)
free_alloc_pool (pre_expr_pool);
htab_delete (phi_translate_table);
htab_delete (expression_to_id);
remove_fake_exit_edges ();
FOR_ALL_BB (bb)
{
......@@ -4203,6 +4192,11 @@ execute_pre (bool do_fre ATTRIBUTE_UNUSED)
statistics_counter_event (cfun, "New PHIs", pre_stats.phis);
statistics_counter_event (cfun, "Eliminated", pre_stats.eliminations);
statistics_counter_event (cfun, "Constified", pre_stats.constified);
/* Make sure to remove fake edges before committing our inserts.
This makes sure we don't end up with extra critical edges that
we would need to split. */
remove_fake_exit_edges ();
gsi_commit_edge_inserts ();
clear_expression_ids ();
......
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