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 Wed, Feb 2, 2011 at 1:42 AM, Alexandre Oliva <aoliva@redhat.com> wrote:
> On Feb ?1, 2011, Richard Guenther <richard.guenther@gmail.com> wrote:
>
>> Did you spot any other users than remove-unused-locals and expand?
>
> Yeah, the just-introduced use that uses the used flag to estimate stack
> sizes for inlining.
>
> Do you suggest we should compute the global usedness of variables of
> each function every time we're about to decide on inlining? ?This sounds
> very expensive to me. ?Perhaps we could compute usedness for all
> variables before going through global inlining/versioning decisions, but
> then we might have to update it locally, for the inlined-into function
> after each inlining, and for the new function version after it's
> created, no?

No.  It's an estimate only and thus can even use a simpler implementation
compared to that in cfgexpand.  Also for inline parameter computation
we already look at all statements, so the cost of determining used
variables looks cheap if it is done at the same time.

Richard.


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