This is the mail archive of the gcc-bugs@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]

[Bug fortran/48636] Enable more inlining with -O2 and higher


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48636

--- Comment #12 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-05-04 16:09:19 UTC ---
Hi,
I discussed some of the issues today with Martin.  For the array descriptor
testcase, we really want ipa-cp to be propagate the constant array bounds
instead of making Inliner to blindly inline enough in all cases.
For that we need

  1) Make ipa-prop to work on aggregates.  For aggregates passed by value we
can have jump functions that define known constants at known offsets
  2) Make ipa-inline-analysis to produce predicates on constantness of
aggregate fields in the same format
  3) Array descriptors are passed by reference, rather than by value.  This
need further work, since need to be sure that the value passed does not change
by aliasing.  IPA-SRA would help here if it was really SRA and we had
-fwhole-program, but that is weak. We would need IPA-PTA to solve this in
general. Perhaps frontend could help us here since the descriptors are probably
constant after they are initialized, or is there way to change existing
descriptor?
  4) Make ipa-inline-analysis to understand that determining loop bounds is
very cool to do.

I also looked into the dumps of fatigue. One obvious problem is that we
overestimate stack sizes by about factor of 10.  This seems to be mostly due to
I/O routines structures that gets packed later. 
We used to take results of stack frame packing, but Steven reverted this
behaviour and now we estimate stack sizes by simply summing up the size of
local arrays. I wonder, perhaps we want to revert to original way at least when
optimizing and when generating summary for late inliner (early inliner probably
does not care and Steven's main concern was that this is computed 3 times,
twice for early inliner and once for real inliner).

Honza


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