[llvm-dev] [LLVM v3.8.0rc3] cmake-2.8.12: Statistics gcc-4.9 VS. clang-3.8

Sedat Dilek via llvm-dev llvm-dev at lists.llvm.org
Fri Feb 26 03:00:57 PST 2016


[ Please CC me I am not subscribed to this ML ]

Original posting from [1]...

<QUOTE>
On Thu, Feb 25, 2016 at 05:13:05PM +0100, Sedat Dilek via llvm-dev wrote:
> Build-time increased approx. 1h from 2 to 3 hours when using CMAKE
> instead of CONFIGURE/MAKE (logs deleted for LLVM v3.8.0rc2).
> Building always done with one single parallel-compile-jobs.
> When using CMAKE $COMPILER does not matter, it's approx. 3 hours build-time.

Are you sure that you are actually using equivalent settings? cmake vs
manual Makefiles should have at most a few percent performance impact
for a full build on moderate concurrent load. It should certainly not be
a factor of 2 or 3.

Joerg
</QUOTE>

You are right!

1st...
...I tried to use the same (configure) options for an "optimized"
(optimized in the sense of "fit for my needs") build.

2nd...
...I built with different Linux-kernels booted on my Ubuntu/precise
AMD64 system. That can matter!

Normally, I boot the latest "official" Ubuntu-kernel
(v3.13.0-79-generic) whereas I used my self-compiled Linux
v4.4.2-1-iniza-small.
(BTW, I use and have installed only the Linux header files from the
latest official Ubuntu-kernel. )

3rd...
...I switched over from autoconf/make to cmake/ninja build-system when
building LLVM/Clang v3.8.

With "compile-jobs=2" and "link-jobs=1" I could reduce my build-time
down to 01h30m.
( Higher values produce here MCE errors - bad heat cooling in my
Samsung Ultrabook. )

Interesting for me is the fact that my install-dir was reduced about
250MiB when building with clang-3.8 compared with gcc-4.9.

Numbers and values see post-scriptum and attached scripts (I splitted
into "make/autoconf" and "cmake/ninja").

So, I have now a good base when LLVM/Clang v3.8 FINAL is realeased.

Regards,
- Sedat -

[1] http://lists.llvm.org/pipermail/llvm-dev/2016-February/095928.html

P.S.: Demonstrate some numbers and values.

[ CLANG v3.8.0rc3 | CMAKE v3.4.3 | NINJA v1.6.0 ]

$ egrep -i 'jobs|ninja'
logs/3.8.0rc3_clang-3-8-0-rc3_cmake-3-4-3_ninja-1-6-0_compile-jobs-2_link-jobs-1/CMakeCache.txt
//Program used to build from build.ninja files.
CMAKE_MAKE_PROGRAM:FILEPATH=/opt/cmake/bin/ninja
//Define the maximum number of concurrent compilation jobs.
LLVM_PARALLEL_COMPILE_JOBS:STRING=2
//Define the maximum number of concurrent link jobs.
LLVM_PARALLEL_LINK_JOBS:STRING=1
CMAKE_GENERATOR:INTERNAL=Ninja

$ cd statistics/3.8.0rc3_clang-3-8-0-rc3_cmake-3-4-3_ninja-1-6-0_compile-jobs-2_link-jobs-1/

$ cat disc-usage_llvm-toolchain-3.8.0rc3_clang-3-8-0-rc3_cmake-3-4-3_ninja-1-6-0_compile-jobs-2_link-jobs-1.txt
315     llvm
941     llvm-build
609     /opt/llvm-toolchain-3.8.0rc3

$ cat build-time_llvm-toolchain-3.8.0rc3_clang-3-8-0-rc3_cmake-3-4-3_ninja-1-6-0_compile-jobs-2_link-jobs-1.txt
-rw-r--r-- 1 wearefam wearefam 130196 Feb 25 22:26
logs/3.8.0rc3_clang-3-8-0-rc3_cmake-3-4-3_ninja-1-6-0_compile-jobs-2_link-jobs-1/install-log_llvm-toolchain-3.8.0rc3.txt
-rw-r--r-- 1 wearefam wearefam 205762 Feb 25 22:18
logs/3.8.0rc3_clang-3-8-0-rc3_cmake-3-4-3_ninja-1-6-0_compile-jobs-2_link-jobs-1/build-log_llvm-toolchain-3.8.0rc3.txt
-rw-r--r-- 1 wearefam wearefam  14335 Feb 25 20:48
logs/3.8.0rc3_clang-3-8-0-rc3_cmake-3-4-3_ninja-1-6-0_compile-jobs-2_link-jobs-1/configure-log_llvm-toolchain-3.8.0rc3.txt

[ GCC v4.9.2 | MAKE v3.8.1 | AUTOCONF v2.68 ]

$ cd statistics/3.8.0rc3_gcc-4-9-2_make-3-8-1_autoconf-2-68_make-jobs-1

$ cat build-time_llvm-toolchain-3.8.0rc3_logs_make-jobs-1.txt
-rw-r--r-- 1 wearefam wearefam 138872 Feb 24 18:55
logs/install-log_llvm-toolchain-3.8.0rc3.txt
-rw-r--r-- 1 wearefam wearefam 344202 Feb 24 18:45
logs/build-log_llvm-toolchain-3.8.0rc3.txt
-rw-r--r-- 1 wearefam wearefam  14295 Feb 24 15:53
logs/configure-log_llvm-toolchain-3.8.0rc3.txt

$ cat disc-usage_llvm-toolchain-3.8.0rc3.txt
315     llvm
1464    llvm-build
864     /opt/llvm-toolchain-3.8.0rc3

- EOT -
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build_llvm-toolchain_clang-cmake-ninja.sh
Type: application/x-sh
Size: 3058 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160226/44a815cc/attachment.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build_llvm-toolchain_gcc-make-autoconf.sh
Type: application/x-sh
Size: 2320 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160226/44a815cc/attachment-0001.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: install_llvm-toolchain_clang-cmake-ninja.sh
Type: application/x-sh
Size: 2561 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160226/44a815cc/attachment-0002.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build_llvm-toolchain_gcc-make-autoconf.sh
Type: application/x-sh
Size: 2320 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160226/44a815cc/attachment-0003.sh>


More information about the llvm-dev mailing list