This is the mail archive of the gcc@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: Beginner's question:Are there any inter-procedural optimizationin GCC backend ?


Geoff Keating <geoffk@geoffk.org> writes:

> "Zack Weinberg" <zack@codesourcery.com> writes:
>
>> 2) The RTL inliner is a major obstacle to making all RTL be
>>    transiently allocated, and therefore to removing RTL from the
>>    purview of the garbage collector.  Daniel Berlin has numbers
>>    indicating that allocation of RTL from the GC heap causes huge
>>    amounts of memory to be wasted, with consequent compile-time
>>    performance hit.
>
> The RTL inliner is not the only obstacle to this.  Many places in the
> backends and in the middle-end keep references to RTL which they
> expect to stay around forever. 

Right.  I think those places are all susceptible to being found and
fixed, though.  The big open question in my mind is whether DECL_RTL
can be made just a cached derivative of information elsewhere in the
DECL, for all DECLs.

> Usually these things are constants of some form, SYMBOL_REFs or
> CONST_INTs, but LABEL_REFs are also constant, which is the point at
> which life becomes complicated.

CODE_LABELs don't have meaning outside of a given function, except
insofar as we need to be careful not to duplicate label names, which
is taken care of by the label_num counter.  And I don't see any
places where anything holds on to a CODE_LABEL after the insn chain
for the containing function is thrown away (but I didn't look very
hard).  Could you be more specific about the problem?

zw


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