This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PR debug/47106] account used vars only once


On Jan 20, 2011, Alexandre Oliva <aoliva@redhat.com> wrote:

> 	* tree-dfa.c (create_var_ann): Mark variable as used.

> Index: gcc/tree-dfa.c
> ===================================================================
> --- gcc/tree-dfa.c.orig	2011-01-20 15:42:18.837908738 -0200
> +++ gcc/tree-dfa.c	2011-01-20 15:44:10.794077945 -0200
> @@ -137,6 +137,9 @@ create_var_ann (tree t)
>    ann = ggc_alloc_cleared_var_ann_d ();
>    *DECL_VAR_ANN_PTR (t) = ann;
 
> +  /* Assume the variable is used, at least for now.  */
> +  ann->used = true;
> +
>    return ann;
>  }
 
This hunk caused PR 47402, so I've reverted it, but I left the rest of
the patch in.  I'll be away tomorrow, but I'll look back into this on
Sunday to figure out why we're making different decisions regarding the
(partial) inlining of get_integer, and their different stack sizes.  I
suspect we may have to propagate used flags when cloning variables, or
run some pass to figure out what's used/unused after (partial) cloning,
for we seem to be looking at default-initialized (not recomputed)
information, a possibility that IIUC you and honza were concered about
when reviewing the original patch, but that went way over the top of my
head :-(

As I said, I'll look into it on Sunday, but any tips on where to insert
recomputation or somesuch would be highly appreciated.

TIA,

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]