> All distros, save for say Gentoo, inline only functions explicitly asked
> to be inlined.
>
> No additional compile-time inlining occurs.

Really?

--------------------------------------------------------------------
[EMAIL PROTECTED]:~> cat i.c
static int
foo (void)
{
  return 42;
}

int
main (int argc, char **argv)
{
  return foo ();
}
[EMAIL PROTECTED]:~> gcc -Wall -O2 -S i.c
[EMAIL PROTECTED]:~> cat i.s
        .file   "i.c"
        .text
        .p2align 4,,15
.globl main
        .type   main, @function
main:
        pushl   %ebp
        movl    %esp, %ebp
        pushl   %eax
        pushl   %eax
        movl    $42, %eax
        andl    $-16, %esp
        subl    $16, %esp
        leave
        ret
        .size   main, .-main
        .section        .note.GNU-stack,"",@progbits
        .ident  "GCC: (GNU) 3.3.5 20050117 (prerelease) (SUSE Linux)"
--------------------------------------------------------------------

I want my foo back!

M.
_______________________________________________
Performance-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/performance-list

Reply via email to