From e04faf242e40afa98183a425e2da2500dd8fe4c6 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 28 Jan 2014 13:13:54 +0000 Subject: [PATCH] revert: re PR middle-end/45364 (Compiling wine's directx.c with -O1 -g takes a very long time) 2014-01-28 Richard Biener Revert 2014-01-28 Richard Biener PR rtl-optimization/45364 PR rtl-optimization/59890 * var-tracking.c (local_get_addr_clear_given_value): Handle already cleared slot. (val_reset): Handle not allocated local_get_addr_cache. (vt_find_locations): Use post-order on the inverted CFG. From-SVN: r207182 --- gcc/ChangeLog | 12 ++++++++++++ gcc/var-tracking.c | 14 ++++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dca387d3ea8..53934ebb60d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2014-01-28 Richard Biener + + Revert + 2014-01-28 Richard Biener + + PR rtl-optimization/45364 + PR rtl-optimization/59890 + * var-tracking.c (local_get_addr_clear_given_value): Handle + already cleared slot. + (val_reset): Handle not allocated local_get_addr_cache. + (vt_find_locations): Use post-order on the inverted CFG. + 2014-01-28 Richard Biener * tree-data-ref.h (ddr_is_anti_dependent, ddrs_have_anti_deps): diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index 512c08bb120..cfa785079f6 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -2481,8 +2481,7 @@ static bool local_get_addr_clear_given_value (const void *v ATTRIBUTE_UNUSED, void **slot, void *x) { - if (*slot != NULL - && vt_get_canonicalize_base ((rtx)*slot) == x) + if (vt_get_canonicalize_base ((rtx)*slot) == x) *slot = NULL; return true; } @@ -2502,8 +2501,7 @@ val_reset (dataflow_set *set, decl_or_value dv) gcc_assert (var->n_var_parts == 1); - if (var->onepart == ONEPART_VALUE - && local_get_addr_cache != NULL) + if (var->onepart == ONEPART_VALUE) { rtx x = dv_as_value (dv); void **slot; @@ -6936,12 +6934,12 @@ vt_find_locations (void) bool success = true; timevar_push (TV_VAR_TRACKING_DATAFLOW); - /* Compute reverse top sord order of the inverted CFG + /* Compute reverse completion order of depth first search of the CFG so that the data-flow runs faster. */ - rc_order = XNEWVEC (int, n_basic_blocks_for_fn (cfun)); + rc_order = XNEWVEC (int, n_basic_blocks_for_fn (cfun) - NUM_FIXED_BLOCKS); bb_order = XNEWVEC (int, last_basic_block_for_fn (cfun)); - int num = inverted_post_order_compute (rc_order); - for (i = 0; i < num; i++) + pre_and_rev_post_order_compute (NULL, rc_order, false); + for (i = 0; i < n_basic_blocks_for_fn (cfun) - NUM_FIXED_BLOCKS; i++) bb_order[rc_order[i]] = i; free (rc_order);