inlining failed

Andreas Jaeger aj@suse.de
Sat Sep 6 19:11:00 GMT 2003


Gunther Piez <gpiez@web.de> writes:

> On Saturday 06 September 2003 19:05, Andreas Jaeger wrote:
>> Paolo Carlini <pcarlini@unitus.it> writes:
>> > Gunther Piez wrote:
>> >>It's still there, but you need different code to trigger it.
>> >>I've tried it with gcc 3.4 20030903.
>> >> Unforunatly I'm not able to simplify the offending code to more than
>> >> that (and I have tried hard):
>> >
>> > Here I have ready at hand 3.4 20030905, checked out yesterday, and
>> > everything is ok on i686-pc-linux-gnu.
>>
>> Since 0905 the following patch is in:
>> Fri Sep  5 07:35:16 CEST 2003  Jan Hubicka  <jh@suse.cz>
>>
>>         * opts.c (decode_options): Enable unit-at-a-time at -O2.
>>         * params.def (max-inline-insns-single): Set to 500
>>         (max-inline-insns-auto): Set to 150
>>         * invoke.texi (max-inline-insns-single, max-inline-insns-auto):
>> Update.
>
> Ok, now i got it. Even if I declare a function 'inline', it is only inlined if 
> it doesn't exceed the instruction limit given by 'max-inline-insns-single' or 
> if it is declared with __attribute__((always_inline)). I used 'always_inline' 
> before as a workaround, but it's ugly for debugging.

The patch also implements better heuristics, try adding
-funit-at-a-time to your compiler to see them in effect.

>> So, it seems that the new heuristics fixed it.
>
> Yes.
>
>> Gunter didn't use "current mainline" but something older,
>
> After adding a '--param max-inline-insns-single=500' everything now gets 
> inlined like I want, even with my rusty old gcc 3.4 20030903 :-) 
> Is there a source for daily tarballs or do I have to do a cvs checkout the get 
> 'current'?

We only have weekly tarballs,
Andreas
-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20030906/fd6a0ff8/attachment.sig>


More information about the Gcc mailing list