https://bugs.llvm.org/show_bug.cgi?id=37464
Bug ID: 37464
Summary: Clang 6.0 takes extremely long time to compile a
specific file.
Product: clang
Version: 6.0
Hardware: PC
OS: FreeBSD
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
Assignee: unassignedclangb...@nondot.org
Reporter: free...@shaneware.biz
CC: llvm-bugs@lists.llvm.org
Using clang 6.0 to compile a specific file from the godot project is
excessively long.
clang 5.0 compiles this file in around 4 seconds
clang 6.0 compiles the same file in 5842 seconds (yes over 1.5 hours, the
entire project can normally be built in under 700 seconds)
I am using FreeBSD 11-stable, this issue was first noticed on 12-current after
clang6 was added as the base compiler. I see the same issue on FreeBSD 11 using
clang6 from ports.
clang++ --version
FreeBSD clang version 5.0.1 (tags/RELEASE_501/final 320880) (based on LLVM
5.0.1)
clang++60 --version
clang version 6.0.0 (tags/RELEASE_600/final)
This happens with an amd64 target, adding -m32 allows clang6 to compile the
file in a few seconds.
The issue appears to be in the optimisation, using -O0 compiles in a few
seconds while -O1 or higher takes thousands of seconds.
The godot project is a game engine, it can be built as a runtime only or as an
IDE. Building with the IDE enabled bypasses this issue, it only happens with a
runtime only build.
Within the godot project the file is servers/physics/collision_solver_sat.cpp
https://github.com/godotengine/godot/blob/master/servers/physics/collision_solver_sat.cpp
I haven't had any luck compiling this one file outside of the main project, so
the best I can recommend is to start building the port on FreeBSD, stop the
build once the first couple of files have compiled and then manually compile
the specific file.
cd /usr/ports/devel/godot
make
Ctrl-C
cd work/godot-3.0.2-stable
time clang++60 -o servers/physics/collision_solver_sat.x11.opt.64.llvm.o -c
-pipe -g1 -O3 -ffast-math -fstack-protector -fno-strict-aliasing
-DRTAUDIO_ENABLED -pthread -w -DNDEBUG -DZSTD_STATIC_LINKING_ONLY
-DFREETYPE_ENABLED -DRECAST_ENABLED -DSVG_ENABLED -DTYPED_METHOD_BIND
-DTOUCH_ENABLED -DALSA_ENABLED -DOSS_ENABLED -DPULSEAUDIO_ENABLED -DX11_ENABLED
-DUNIX_ENABLED -DOPENGL_ENABLED -DGLES_ENABLED -DPTRCALL_ENABLED
-DGDSCRIPT_ENABLED -DMINIZIP_ENABLED -DXML_ENABLED -DGLAD_ENABLED
-DGLES_OVER_GL -D_THREAD_SAFE -D_REENTRANT -Icore -Icore/math -Ieditor
-Idrivers -I. -I/usr/local/include -I/usr/local/include/freetype2
-I/usr/local/include/libpng16 -Iplatform/x11 -Ithirdparty/zstd
-Ithirdparty/zstd/common -Ithirdparty/rtaudio -Ithirdparty/glad
-Ithirdparty/recastnavigation/Recast
-Ithirdparty/recastnavigation/Recast/Include -Ithirdparty/nanosvg
servers/physics/collision_solver_sat.cpp
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs