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 optimization in GCC backend ?


Two are known to me:

1) PR 9972 has been concluded to be impossible to fix so long as some
   front ends use both inliners.

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.


Note that this is mainly due to the extremely variant lifetimes of RTL. Some of it lives long time, some of it lives very short time. Since we have no idea which is which, we end up with pages that would be freed, except for some small number of pieces of RTL on them (ie 100-200 bytes out of 4096). This happens quite frequently. Trees have variant lifetimes, but nowhere near the variation you see with RTL.
One of the reasons the zone allocator does better is because it doesn't let RTL allocations interfere with trees or other allocated things.


zw


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