https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78972

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |7.0

--- Comment #6 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #5)
> What happens if you add -fschedule-insns?

-fschedule-insns makes the stack use slightly higher.  With current trunk:

ig25@linux-fd1f:~/Krempel/SMID> gcc -O1  -S example.c && grep subq example.s
        subq    $2416, %rsp
ig25@linux-fd1f:~/Krempel/SMID> gcc -O1 -fschedule-insns -S example.c && grep
subq example.s
        subq    $2432, %rsp


By comparison, gcc 4.8 uses _far_ less stack:

ig25@linux-fd1f:~/Krempel/SMID> /usr/bin/gcc -O1  -S example.c && grep subq
example.s
        subq    $272, %rsp
ig25@linux-fd1f:~/Krempel/SMID> /usr/bin/gcc -O1 -fschedule-insns -S example.c
&& grep subq example.s
        subq    $416, %rsp

-O2 and -O3 do not help either.

Reply via email to