[LLVMbugs] [Bug 10183] New: Large bottleneck observed for certain PostgreSQL TUs

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jun 23 14:40:57 PDT 2011


           Summary: Large bottleneck observed for certain PostgreSQL TUs
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: peter.geoghegan86 at gmail.com
                CC: llvmbugs at cs.uiuc.edu

When building PostgreSQL using my own build of today's clang trunk, I observed
performance that is dramatically inferior for some TUs, to the extent that I am
confident that something is wrong.

Observe the differences in compile times of the file
/src/backend/parser/gram.c . The warning message that you see is a
known bug with Gnu Bison that they refuse to fix:

[peter at peter postgresql]$ time /home/peter/build/Release/bin/clang -O2
-Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels -Wformat-security
-fno-strict-aliasing -fwrapv -Wno-error -I. -I. -I
/home/peter/postgresql/src/include -D_GNU_SOURCE   -c -o gram.o
In file included from gram.y:12939:
scan.c:16246:23: warning: unused variable 'yyg' [-Wunused-variable]
   struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be ...
1 warning generated.

real    1m5.660s
user    1m5.344s
sys     0m0.083s
[peter at peter postgresql]$ time gcc -O2 -Wall -Wmissing-prototypes
-Wpointer-arith -Wdeclaration-after-statement -Wendif-labels
-Wformat-security -fno-strict-aliasing -fwrapv -Wno-error -I. -I. -I
/home/peter/postgresql/src/include -D_GNU_SOURCE   -c -o gram.o
In file included from gram.y:12939:0:
scan.c: In function ‘yy_try_NUL_trans’:
scan.c:16246:23: warning: unused variable ‘yyg’ [-Wunused-variable]

real    0m2.800s
user    0m2.688s
sys     0m0.094s

That's a difference way out of proportion to the total
difference in compile times, which are:

2 minutes 1 second for gcc 4.6. 
3 minutes 23 seconds for Clang, built today from SVN tip.

Clearly, this source file and perhaps one or two others like it are massive

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list