[PR debug/47624] improve value tracking in non-VTA locations

Jakub Jelinek jakub@redhat.com
Tue Feb 15 19:07:00 GMT 2011


On Tue, Feb 15, 2011 at 04:14:29PM -0200, Alexandre Oliva wrote:
> VTA only tracks locations of gimple regs, while addressable variables
> still use the old var tracking strategy.  This means addressable
> variables, during var-tracking, got locations that were not based on
> VALUEs, which failed immediately in the presence of auto-inc addresses.
> The locations also tended to degrade in other ways, when a register
> holding an address happened to be overwritten at a later point.
> 
> This patch arranges for us to track addresses of these variables as
> VALUEs, and to emit new locations for them when a location whose value
> was used to compute its address changes, fixing the problem.
> 
> The patch was regstrapped on x86_64-linux-gnu and i686-linux-gnu.  Ok to
> install?
> 

While I think it is a good idea, I'd say this should be stage 1 material,
after all it isn't a regression.  For the testcase in question I think
we also want to improve cselib.c as I wrote in the PR, to canonicalize
locs of VALUE + CONST_INT M when VALUE has locs of the form VALUE' + CONST_INT N
to VALUE' + CONST_INT (M + N), then we'd figure out we should use fbreg
and don't need to change the location description through the function.

> for  gcc/ChangeLog
> from  Alexandre Oliva  <aoliva@redhat.com>
> 
> 	PR deug/47624

s/deug/debug/

> 	* var-tracking.c (add_stores): Add FIXME note.
> 	(compute_bb_dataflow): Use value-based locations in MO_VAL_SET.
> 	(emit_notes_in_bb): Likewise.
> 	(check_changed_vars_4): New.
> 	(emit_noets_for_changes): Call it.

s/noets/notes/

	Jakub



More information about the Gcc-patches mailing list