diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-28 09:02:59 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-28 09:02:59 +0000 |
commit | 64eb97fb1c1654613b466628922d61e82a945122 (patch) | |
tree | 0be3834e9918516bc2d43e10aeef83586410ec03 /gcc/var-tracking.c | |
parent | 18350b2ed50994adf75be77f4b0abd8d33c4e4e8 (diff) | |
download | gcc-64eb97fb1c1654613b466628922d61e82a945122.tar.gz |
2014-01-28 Richard Biener <rguenther@suse.de>
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207172 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/var-tracking.c')
-rw-r--r-- | gcc/var-tracking.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index cfa785079f6..512c08bb120 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -2481,7 +2481,8 @@ static bool local_get_addr_clear_given_value (const void *v ATTRIBUTE_UNUSED, void **slot, void *x) { - if (vt_get_canonicalize_base ((rtx)*slot) == x) + if (*slot != NULL + && vt_get_canonicalize_base ((rtx)*slot) == x) *slot = NULL; return true; } @@ -2501,7 +2502,8 @@ val_reset (dataflow_set *set, decl_or_value dv) gcc_assert (var->n_var_parts == 1); - if (var->onepart == ONEPART_VALUE) + if (var->onepart == ONEPART_VALUE + && local_get_addr_cache != NULL) { rtx x = dv_as_value (dv); void **slot; @@ -6934,12 +6936,12 @@ vt_find_locations (void) bool success = true; timevar_push (TV_VAR_TRACKING_DATAFLOW); - /* Compute reverse completion order of depth first search of the CFG + /* Compute reverse top sord order of the inverted CFG so that the data-flow runs faster. */ - rc_order = XNEWVEC (int, n_basic_blocks_for_fn (cfun) - NUM_FIXED_BLOCKS); + rc_order = XNEWVEC (int, n_basic_blocks_for_fn (cfun)); bb_order = XNEWVEC (int, last_basic_block_for_fn (cfun)); - pre_and_rev_post_order_compute (NULL, rc_order, false); - for (i = 0; i < n_basic_blocks_for_fn (cfun) - NUM_FIXED_BLOCKS; i++) + int num = inverted_post_order_compute (rc_order); + for (i = 0; i < num; i++) bb_order[rc_order[i]] = i; free (rc_order); |