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]

[PATCH] gcc-3.3: Make -finline-limit work (PR/8387)


Hi gcc hackers,

I see occasional grumbling about the gcc inliner not inlining a function
that should be inlined. It happens because the function is too large (more
than 30 tree statements counted by gcc) or because the inlining budget has
been eaten up by recursive inlining already. So, increasing -finline-limit
above the default of 600 should help. Unfortunately, it does not always,
as the single function limit (--param max-inline-insns-single) does not get
initialized by -finline-limit at this moment. Explicitly specifying this
parameter should help.
I'm responsible for this, as a patch of mine got merged, but unfortunately
a preliminary version that lacked two things:
* Initialization of all inlining parameters by -finline-limit
* Documentation of all the parameters.

A bug report has been filed (PR/8387) by Dave Johannesen and I have sent a
patch that does fix these two things. 
http://gcc.gnu.org/ml/gcc-patches/2002-10/msg01367.html
[Note that that mail contained a second patch that does further improve
 inlining by differentiating between functions declared "inline" and 
 those considered because of -finline-functions aka -O3 and allows
 applying a different (lower) limit to them. I'm afriad that one is a 
 bit late for 3.3.0 now.]

I think the patch should have been merged, as nobody opposed to it. 
But apparently nobody took care until today :-(

I rediffed against recent gcc-3_3-branch and retested (bootstrapped and a
few test compilations).

Find the patch attached. Please apply to 3.3 branch!

Regards,
-- 
Kurt Garloff                   <kurt at garloff dot de>             [Koeln, DE]
Physics:Plasma modeling <garloff at plasimo dot phys dot tue dot nl> [TU Eindhoven, NL]
Linux:SCSI, Security           <garloff at suse dot de>    [SuSE Nuernberg, DE]

Attachment: gcc33-inl-limit-v41-docu.diff
Description: gcc33-inl-limit-v41-docu.diff

Attachment: pgp00000.pgp
Description: PGP signature


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