[llvm-commits] [PATCH] CMake option for enabling optimization for utilities in debug build

Erik Olofsson Erik.Olofsson at hansoft.se
Sun Mar 13 14:15:21 PDT 2011


This patch enables optimization for the utilities such as tblgen in the utils dir in Debug builds. This decreases the compile time of the debug build considerably on Visual Studio, and somewhat on OSX.

To get optimization of dependant libraries as well LLVMSupport is duplicated into LLVMSupportRelease when the option is enabled. The option is off by default.

Benchmarks:

Visual Studio 2010 Debug: 8 cores 16 threads
cmake -DLLVM_TARGETS_TO_BUILD="all" -DLLVM_ALWAYS_OPTIMIZE_UTILS:BOOL=OFF ../llvm
7m32s

Visual Studio 2010 Debug: 8 cores 16 threads
cmake -DLLVM_TARGETS_TO_BUILD="all" -DLLVM_ALWAYS_OPTIMIZE_UTILS:BOOL=ON ../llvm
4m50s

OSX only built to 96% because of broken libclang ld with or without patch:

OSX: 4 cores 8 threads
cmake -DCMADE_BUILD_TYPE=Debug -DLLVM_ALWAYS_OPTIMIZE_UTILS:BOOL=OFF ../llvm
time make -j12
real 7m19s
user 39m1s
sys 4m16s

OSX: 4 cores 8 threads
cmake -DCMADE_BUILD_TYPE=Debug -DLLVM_ALWAYS_OPTIMIZE_UTILS:BOOL=ON ../llvm
time make -j12
real 7m1s
user 36m34s
sys 4m6s



Please review and commit if appropriate.

Regards,
Erik
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: llvm-optimized-utilities-in-debug-build.patch.txt
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110313/71240874/attachment.txt>


More information about the llvm-commits mailing list