New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 601486 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue v8:4856
Owner:
Last visit > 30 days ago
Closed: Apr 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Clang compile for v8_base on host is very slow.

Project Member Reported by s...@chromium.org, Apr 7 2016

Issue description

For Chromecast cross-compiles, compiling v8_base for the host with clang hangs for about 10 minutes. We have done some research in an internal bug (b/28027960), and suspect a clang corner-case bug. Here are the key observations:

1) This is not seen when using gcc.

2) Changing the optimization used results in a massive speedup (no other differences). Here are the compile times for counters.cc:

-O2: 8m41.966s (default)
-O0: 3.535s

3) The heavy use of FOR_EACH_INTRINSIC seems to be a likely suspect. Register allocation may be tripping up clang when optimization is on. Changing the char* to a std::string here causes the performance issues to disappear:

https://code.google.com/p/chromium/codesearch#chromium/src/v8/src/counters.h&l=486


Next steps are to find a way to reproduce this on a public Chromium build and assign to v8 for triage.

 
Cc: thakis@chromium.org
I created a minimal test case that exhibits the clang slowness issue.

time g++ -O2 -m32 -std=c++11 -c clang_test.cc -o clang_test.o
real	0m5.948s
user	0m5.901s
sys	0m0.043s

time ../../third_party/llvm-build/Release+Asserts/bin/clang++ -O2 -m32 -std=c++11 -c clang_test.cc -o clang_test.o
real	1m13.431s
user	1m12.337s
sys	0m0.976s

clang_test.cc
923 bytes View Download
Nice repro though!
Mergedinto: v8:4856
Status: Duplicate (was: Assigned)

Sign in to add a comment