Hi, Richi,

Sorry if this comes in late.  I'd saved your message for careful
analysis and I only got back to it now.

On Aug  1, 2012, Richard Guenther <richard.guent...@gmail.com> wrote:

> On Fri, Dec 2, 2011 at 8:28 PM, Jakub Jelinek <ja...@redhat.com> wrote:
>> PR debug/50317
>> * tree-ssa.c (target_for_debug_bind): Also allow is_gimple_reg_type
>> vars that aren't referenced.
>> (tree-ssa-live.c (remove_unused_locals): Don't clear TREE_ADDRESSABLE
>> of unreferenced local vars.
>> * cfgexpand.c (expand_debug_expr): For DEBUG_IMPLICIT_PTR allow also
>> TREE_ADDRESSABLE vars that satisfy target_for_debug_bind.

> But we do _not_ want to
> have used non-register (but register type) variables tracked because we
> do not track aliases?

The reasoning, back when I wrote target_for_debug_bind, was that it
didn't make sense to enable VTA for variables that were addressable,
because the location of addressable variables isn't subject to change.
Since their location is a constant address, we're better off avoiding
all the VTA location wrangling and just using their unchanging MEM
location.

> -  if (!is_gimple_reg (var))
> -    {
> -      if (is_gimple_reg_type (TREE_TYPE (var))
> -         && referenced_var_lookup (cfun, DECL_UID (var)) == NULL_TREE)
> -       return var;
> -      return NULL_TREE;
> -    }
> +  /* var-tracking only tracks registers.  */
> +  if (!is_gimple_reg_type (TREE_TYPE (var)))
> +    return NULL_TREE;

This change, although not incorrect, would subject lots of variables
unnecessary VTA treatment, growing memory use and compile time.

-- 
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 Compiler Engineer

Reply via email to