[LLVMbugs] [Bug 10203] New: [regression] tail duplication changes negatively impacted Clang runtime performance
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jun 27 11:05:23 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10203
Summary: [regression] tail duplication changes negatively
impacted Clang runtime performance
Product: libraries
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: Scalar Optimizations
AssignedTo: unassignedbugs at nondot.org
ReportedBy: daniel at zuster.org
CC: llvmbugs at cs.uiuc.edu
I happened to notice that the code generation changes in:
http://llvm.org/viewvc/llvm-project?view=rev&revision=133682
had a negative impact on the runtime performance of a self-hosted Clang
executable, by a fairly significant margin (1-2%).
I don't have more detailed information on the exact piece of code where the
regression is yet, but here is the data I have on the regression:
My test scenario uses flops-8.c from nightly test, although I suspect the exact
input isn't very important, it is just one where we noticed the regression:
http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Misc/flops-8.c?revision=47963&content-type=text%2Fplain
My test script uses a simple timing tool 'runN' and runs the frontend on the
same input many times to decrease sampling error. You can replace 'runN 10'
with 'time':
--
ddunbar at smoosh-17:9670555$ cat test.sh
#!/bin/sh
runN 10 $1 \
"-cc1" "-triple" "x86_64-apple-macosx10.6.7" "-emit-obj" "-mrelax-all"
"-disable-free" "-main-file-name" "flops-8.c" "-pic-level" "1" \
"-mdisable-fp-elim" "-masm-verbose" "-munwind-tables" "-target-cpu" "core2"
"-target-linker-version" "123.4" "-g" \
"-coverage-file" "flops-8.o" "-resource-dir" "/tmp" \
"-O0" "-ferror-limit" "19" "-fmessage-length" "90" "-stack-protector" "1"
"-fblocks" "-fdiagnostics-show-option" "-o" "flops-8.o" "-x" "c" \
flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c
flops-8.c flops-8.c flops-8.c \
flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c
flops-8.c flops-8.c flops-8.c \
flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c
flops-8.c flops-8.c flops-8.c \
flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c
flops-8.c flops-8.c flops-8.c \
flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c
flops-8.c flops-8.c flops-8.c \
flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c
flops-8.c flops-8.c flops-8.c \
flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c
flops-8.c flops-8.c flops-8.c \
flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c
flops-8.c flops-8.c flops-8.c \
flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c
flops-8.c flops-8.c flops-8.c \
flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c flops-8.c
flops-8.c flops-8.c flops-8.c
--
The following test samples show the regression. Here I am using a fixed
LLVM/Clang revision (r133682) built and installed in the normal
configure/make/make install fashion using the following configure arguments:
--
~/llvm.ref/src/configure \
--prefix=$idir \
--disable-bindings --with-built-clang --with-llvmcc=clang \
--without-llvmgcc --without-llvmgxx \
--enable-optimized \
CC=$HOSTDIR/usr/bin/clang \
CXX=$HOSTDIR/usr/bin/clang++ &> $dir/configure.log
--
and using "Apple Clang" compilers as the host compilers, from revisions r133679
and r133682. The Apple Clang compilers just differ in the exact way they are
built, they should be functionally identical to configure/make style compilers
at the same revisions.
Here is the timing data on a MacPro 5,1:
--
ddunbar at smoosh-17:9670555$ ./test.sh
custom_builds/clang-r133682__apple-clang-x86_64-darwin10-R__clang-r133679-t20110622_190133-b5349.install/bin/clang
name avg min med max SD total
user 0.8674 0.8667 0.8675 0.8680 0.0004 8.6739
sys 0.0555 0.0544 0.0551 0.0546 0.0011 0.5550
wall 0.9298 0.9331 0.9290 0.9295 0.0016 9.2978
ddunbar at smoosh-17:9670555$ ./test.sh
custom_builds/clang-r133682__apple-clang-x86_64-darwin10-R__clang-r133682-t20110622_204833-b5350.install/bin/clang
name avg min med max SD total
user 0.8874 0.8865 0.8875 0.8888 0.0007 8.8741
sys 0.0555 0.0562 0.0552 0.0541 0.0008 0.5550
wall 0.9706 0.9483 0.9491 0.9506 0.0542 9.7059
# Compare min user times...
ddunbar at smoosh-17:9670555$ python -c 'print .8865 / .8667'
1.02284527518
--
--
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