This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Pad short functions for Atom
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.