[llvm-bugs] [Bug 32037] New: clang is slower than gcc when compiling some codes in chrome
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Feb 21 19:14:14 PST 2017
http://bugs.llvm.org/show_bug.cgi?id=32037
Bug ID: 32037
Summary: clang is slower than gcc when compiling some codes in
chrome
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: laszio at google.com
CC: llvm-bugs at lists.llvm.org
Created attachment 18016
--> http://bugs.llvm.org/attachment.cgi?id=18016&action=edit
row_common.cc, preprocessed
This is about compile time, not code quality.
When building chrome, there are some objects that take noticeably longer than
gcc. Here are the top 5:
diff / clang-4.0 time / gcc-4.9.2 time / object
17.752848, 58.020705, 40.267857,
obj/third_party/sqlite/chromium_sqlite3/sqlite3.o
10.927715, 15.727189, 4.799474, obj/third_party/libyuv/libyuv/row_common.o
8.964672, 19.499460, 10.534788, obj/v8/v8_base/wasm-interpreter.o
7.865181, 11.146169, 3.280988, obj/third_party/libvpx/libvpx/variance.o
5.407040, 15.328771, 9.921731,
obj/components/policy/cloud_policy_proto_generated_compile_proto/cloud_policy.pb.o
Although this is comparing apples to oranges, it would be nice to make clang
run faster if there are some low hanging fruits. One possibility might be
row_common.o, which is compiled with -march=corei7. Removing the option make it
4x faster.
$ time clang -target x86_64-cros-linux-gnu -O2 -c row_common.cc -march=corei7
real 0m6.920s
user 0m6.900s
sys 0m0.022s
$ time clang -target x86_64-cros-linux-gnu -O2 -c row_common.cc
real 0m1.565s
user 0m1.526s
sys 0m0.037s
Top 10 time-consuming functions:
# Overhead Command Shared Object Symbol
# ........ ................ ................
.................................
#
12.08% clang-4.0 clang-4.0 [.]
combineX86ShufflesRecursively
8.81% clang-4.0 libc-2.23.so [.] malloc
8.05% clang-4.0 clang-4.0 [.] llvm::extractConstantMask
6.86% clang-4.0 clang-4.0 [.] llvm::APInt::shlSlowCase
4.84% clang-4.0 clang-4.0 [.] llvm::APInt::lshr
2.13% clang-4.0 libstdc++.so.6.0 [.] operator new
1.92% clang-4.0 clang-4.0 [.] peekThroughBitcasts
1.63% clang-4.0 clang-4.0 [.] llvm::DecodePSHUFBMask
1.61% clang-4.0 clang-4.0 [.] llvm::APInt::operator|=
1.39% clang-4.0 clang-4.0 [.] llvm::APInt::initSlowCase
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170222/8f3b1946/attachment.html>
More information about the llvm-bugs
mailing list