PATCH: Pad short functions for Atom
H.J. Lu
hjl.tools@gmail.com
Fri Sep 17 15:55:00 GMT 2010
On Fri, Sep 17, 2010 at 7:26 AM, Paolo Bonzini <bonzini@gnu.org> wrote:
> On 09/16/2010 10:38 PM, H.J. Lu wrote:
>>
>> > void
>> > foo (int x)
>> > {
>> > if (x)
>> > bar ();
>> > }
>> > ----
>> >
>> > foo:
>> > testl %edi, %edi
>> > jne .L4
>> > ret
>> > .L4:
>> > xorl %eax, %eax
>> > jmp bar
>> >
>>
>> Padding 4 nops speeds it up by 37%.
>
> I think inlining would speed it up much more (or profiling-driven partial
> inlining for your other testcase; Honza worked on it, I think).
>
Not all functions will be inlined.
--
H.J.
More information about the Gcc-patches
mailing list