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] |
Hi, I finally took the time to split the pieces of my patches that were not integrated back in April into gcc-3. Dale, sorry for taking so long after you pointed me to this problem a month ago. It somehow fell off my TODO list. The first patch does three things: 1. Separate parameter for RTL inlining, max-inline-insns-rtl (same default of 600 as max-inline-insns) 2. Initialize max-inline-insns, max-inline-insns-single and max-inline-insns-rtl from -finline-limit= parameter Also limit min-inline-insns to MIN(130,val/4); 3. Document this. No.1 is not strictly necessary, but helps to make things more clear, also for documentation purposes. The missing of No.2 and No.3 from the April merge should be considered bugs, as Dale correctly insists on. Second patch does the following: 1. Record whether functions have been inlined because of declaration or because of compiler flag. 2. Apply a different limit (max-inline-insns-auto) to the compiler-flag inlined ones. Default for limit is same as for normal functions (max-inline-limit-single). 3. Document it. In my opinion the auto-inlining limit should be lower than the inlining limit for inline-declared functions. For well written code, where authors thought about using the inline keyword where necessary, -O3 often is a regression compared to -O2 and using a more restrictive auto-inlining limit helps this. However, I was reluctant to change the default to not risk any regressions. A change can easily be done later or introduced at the command line. I would propose patch 1 for both gcc-3_2-branch and HEAD and patch 2 only for HEAD. Both diffs are against HEAD from CVS (a few days old). The docu patch, that I'd like to go into 3.2 as well, needs some adjustments to apply to 3.2. I this is deemed useful, I can create and submit a patch against 3.2 as well. Code has been tested on two platforms (GNU/Linux-ix86 and -alpha) and has produced identical binaries, if -finline-limits was not used. Michael Matz and Gerald Pfeifer have looked at the code and given some useful feedback. Thanks! PS: Please Cc: any comments to me. -- Kurt Garloff <garloff@suse.de> Eindhoven, NL GPG key: See mail header, key servers SuSE Labs SuSE Linux AG, Nuernberg, DE SCSI, Security
Attachment:
gcc33-inl-limit-v4-docu.diff
Description: Text document
Attachment:
gcc33-inl-limit-v4-auto.diff
Description: Text document
Attachment:
msg01367/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] |