Displaying 2 results from an estimated 2 matches for "getregforvalue".
2018 Sep 14
6
Function calls keep increasing the stack usage
Hi everyone,
I found that LLVM generates redundant code when calling functions with
constant parameters, with optimizations disabled.
Consider the following C code snippet:
int foo(int x, int y);
void bar()
{
foo(1, 2);
foo(3, 4);
}
Clang/LLVM 6.0 generates the following assembly code:
_bar:
subl $32, %esp
movl $1, %eax
movl $2, %ecx
movl $1, (%esp)
movl $2, 4(%esp)
movl %eax, 28(%esp)
movl
2018 Sep 14
2
Function calls keep increasing the stack usage
Sorry I missed that important detail. The relevant part of the command line
is:
-cc1 -S -triple i386-pc-win32
I don't expect it matters if it's for Windows or Linux in this case.
On Fri, Sep 14, 2018 at 9:16 PM David Blaikie <dblaikie at gmail.com> wrote:
> Can't say I've observed that behavior (though I'm just building from
> top-of-tree rather than 6.0,