[llvm-bugs] [Bug 26160] Missed optimization: stack frame pushing/popping is not optimized away for trivial functions

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jan 15 08:45:19 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=26160

Reid Kleckner <rnk at google.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |rnk at google.com
         Resolution|---                         |WORKSFORME

--- Comment #1 from Reid Kleckner <rnk at google.com> ---
Add -fomit-frame-pointer to get this behavior:

$ clang --target=x86_64-darwin -fomit-frame-pointer -O2 t.c  -S -o -
        .section        __TEXT,__text,regular,pure_instructions
        .macosx_version_min 10, 4
        .globl  _bar
        .align  4, 0x90
_bar:                                   ## @bar
        .cfi_startproc
## BB#0:                                ## %entry
        movl    %edi, %eax
        retq
        .cfi_endproc

Darwin defaults to -fno-omit-frame-pointer because Apple has decided that they
want it to.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160115/8c97dc60/attachment.html>


More information about the llvm-bugs mailing list