[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] avr-gcc making really bad inlining decisions.
From: |
Bill Westfield |
Subject: |
Re: [avr-gcc-list] avr-gcc making really bad inlining decisions. |
Date: |
Fri, 10 Apr 2015 16:56:34 -0700 |
Hmm. Particularly interesting is this series of "Considering"
paragraphs. about 42 all together (one for each call to move3Servos()
in loop()?)
============
Considering void move3Servos(Servo, float, Servo, float, Servo, float,
float) with 87 size
to be inlined into void loop() in oiOSoul.ino:353
Estimated growth after inlined into all is +176 insns.
Estimated badness is -1073741832, frequency 0.04.
Inlined into void loop() which now has time 467 and size 792,net change of -8.
New minimal size reached: 1550
Considering void move3Servos(Servo, float, Servo, float, Servo, float,
float) with 87 size
to be inlined into void doseOff() in oiOSoul.ino:412
Estimated growth after inlined into all is +184 insns.
Estimated badness is -1073741832, frequency 1.00.
Inlined into void doseOff() which now has time 4671 and size 180,net
change of -8.
New minimal size reached: 1542
:
Considering void move3Servos(Servo, float, Servo, float, Servo, float,
float) with 87 size
to be inlined into void loop() in oiOSoul.ino:325
Estimated growth after inlined into all is +412 insns.
Estimated badness is -1073741824, frequency 0.01.
Inlined into void loop() which now has time 360 and size 628,net change of +0.
==============
Each time, the "estimated growth" grows by 8, but the "new minimal
size" shrinks by 8 (if I'm even close to interpreting the text
correctly.) That last one, where inlined growth of 412 instructions
results in a loop() size of 360, is especially confusing. Also that
value for "badness" is really suspicious (0xBFFFFFF8); in the older
compiler, usual values were in the 100 to 1000 range.
Re: [avr-gcc-list] avr-gcc making really bad inlining decisions., Bill Westfield, 2015/04/09