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


> It looks ok when just looking at the documentation of the var_ann
> used filed, but I cannot find the code that computes it during
> out-of-SSA, instead do we rely on remove-unused-locals computing it?

AFAIK remove-unused-locals was supposed to clear it and it was supposed
to be run after passes removing references to locals, so it should be run
before we get into inlinine parameters.
> Are we sure that we at least
> run local vars removal once before we estimated stack frame
> size the first time - I see pass_inline_parameters before the
> first run?  All variables are initially created with used
> set to false (which is a non-conservative default, likely false
> even).  I guess I'm more happy with the patch if you switch the
> initialization in create_var_ann to mark the variable used.
> 
> I can't make sense of the TREE_USED setting in
> estimate_stack_frame_size in the first place - maybe if
> the loop in account_used_vars_for_block would be
> testing !TREE_USED ..., but then only using the
> var-anns used flag in the for-each-local-decl loop will
> have the same problem with debug-compare?
> 
> Thus, I can't see how the duplicate-accounting avoiding
> works (even before your patch), and I smell an inconsistency
> when only partially using var-anns used flags.
> 
> Maybe Honza can explain how the code works ...?
Nope, I think this is Steven's code, since the code originally just executed
the Rth's stack packing path and got its result.

Honza

> 
> Thanks,
> Richard.
> 
> >
> >
> > --
> > 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]