On Jan 20, 2014, Richard Biener <rguent...@suse.de> wrote: > 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) > *slot = NULL; > return true; > }
This part is ok > *************** val_reset (dataflow_set *set, decl_or_va > *** 2501,2507 **** > gcc_assert (var->n_var_parts == 1); > ! if (var->onepart == ONEPART_VALUE) > { > rtx x = dv_as_value (dv); > void **slot; > --- 2502,2509 ---- > gcc_assert (var->n_var_parts == 1); > ! if (var->onepart == ONEPART_VALUE > ! && local_get_addr_cache != NULL) > { > rtx x = dv_as_value (dv); > void **slot; But I think this one is wrong. You don't want to treat a one-part value as if it wasn't one. If we have to discard locs and equivalences for a one-part value that doesn't have any (because we don't even have a local_get_addr_cache yet), you can *probably* just return right away, because your job is already done. So I'd try: if (var->onepart == ONEPART_VALUE) { if (local_get_addr_cache == NULL) return; > ! /* Compute reverse top sord order of the inverted CFG > so that the data-flow runs faster. */ sord? > ! rc_order = XNEWVEC (int, n_basic_blocks_for_fn (cfun)); > bb_order = XNEWVEC (int, last_basic_block_for_fn (cfun)); > ! int num = inverted_post_order_compute (rc_order); > ! for (i = 0; i < num; i++) > bb_order[rc_order[i]] = i; > free (rc_order); This looks reasonable to me, but I'm a bit concerned that changes in the iteration order could break assumptions present in the code. I can't think of anything specific, but I haven't completed swapping this code back in ;-) -- Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/ You must be the change you wish to see in the world. -- Gandhi Be Free! -- http://FSFLA.org/ FSF Latin America board member Free Software Evangelist Red Hat Brazil Toolchain Engineer