Compiling the attached testcase at O > 0 for an ia32 target, ie
/usr/local/gcc-4.3-20070119/bin/g++ -O3 -march=k8 -msse3 -fomit-frame-pointer, 
i get something like
        subl    $2812, %esp
        leal    1100(%esp), %eax
        leal    2808(%esp), %edx
        movl    $0, 976(%esp)
        movl    $0, 980(%esp)
        movl    $0, 968(%esp)
        movl    $0, 972(%esp)
        movl    $0, 960(%esp)
        movl    $0, 964(%esp)
        movl    $0, 952(%esp)
        movl    $0, 956(%esp)
        movl    $0, 928(%esp)
        movl    $0, 932(%esp)
        movl    $0, 904(%esp)
        movl    $0, 908(%esp)
        movl    $0, 888(%esp)
        movl    $0, 892(%esp)
        movl    $0, 872(%esp)
        movl    $0, 876(%esp)
                ...

for the app::frontend_loop() function.

There's 2 problems:
a) g++ generates a larger stack frame than other compilers, msvc 8 sp1: 1152
bytes, icc 9.1: 2108 bytes
b) long strings of movl $0 get coalesced to the top of the function, that
symptom is specific to ia32, it doesn't happen on x86-64

It's not new to 4.3 but with the flashy string op infrastructure one could hope
that b) would be taken care of :)


-- 
           Summary: missed optimization, large stack frame, oodles of
                    upfront movl $0
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tbptbp at gmail dot com
  GCC host triplet: x86*


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30627

Reply via email to