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: inlining failed


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

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]