[llvm-commits] [PATCH] Add MSVC multi processor compilation to build system

Erik Olofsson Erik.Olofsson at hansoft.se
Wed Mar 2 04:48:08 PST 2011


> -----Original Message-----
> From: Francois Pichet [mailto:pichet2000 at gmail.com]
> On Tue, Mar 1, 2011 at 10:36 PM, Erik Olofsson <Erik.Olofsson at hansoft.se>
> wrote:
> >
> > I was building in Debug mode so tblgen in Release mode would probably
> help a lot, but one tblgen project includes to several tblgen, this gives room
> for improvement on msbuild where they are all run sequentially in each
> project.
> >
> > Regards,
> > Erik
>
> hi
>
> Using MSVC 2010 and quadcore.
>
> Complete build (release) trunk: 14 mins 45 secs Complete build (release)
> trunk + patch: 14mins 40 secs
>
> It is within the margin of error here.
>
> so to me this patch doesn't speed things up. Builds are already multi-
> processor on a per project basis.

That is curious, as for large part of the compilation only one or two cores are utilized without /MP. It is expected to some degree as it's much easier to saturate 4 cores than 8 hyper threaded cores (16 threads). Depending on if your CPU is hyper threaded or not I would suspect you may be IO bound.

cmake -DLLVM_TARGETS_TO_BUILD="all" -DLLVM_COMPILER_JOBS=1 ../llvm
Complete build (Release) trunk: 09 mins 59 seconds
Change Lexer.h: 02 minutes 14 seconds
CPU utilization graph: http://www.olofsson.info/clang/Release-CPU-utilization.gif

cmake -DLLVM_TARGETS_TO_BUILD="all" -DLLVM_COMPILER_JOBS=0 ../llvm
Complete build (Release) trunk: 03 mins 29 seconds
Change Lexer.h: 41 seconds
CPU utilization graph: http://www.olofsson.info/clang/Release-MP-CPU-utilization.gif

cmake -DLLVM_TARGETS_TO_BUILD="all" -DLLVM_COMPILER_JOBS=1 ../llvm
Complete build (Debug) trunk: 12 mins 29 seconds
Change Lexer.h: 2 mins 2 seconds
CPU utilization graph: http://www.olofsson.info/clang/Debug-CPU-utilization.gif

cmake -DLLVM_TARGETS_TO_BUILD="all" -DLLVM_COMPILER_JOBS=0 ../llvm
Complete build (Debug) trunk: 7 mins 41 seconds
Change Lexer.h: 51 seconds
CPU utilization graph: http://www.olofsson.info/clang/Debug-MP-CPU-utilization.gif

If you look at http://www.olofsson.info/clang/Release-CPU-utilization.gif you can see the areas where only one or two cores are utilized. It would be interesting to see such graphs for your builds.

Regards,
Erik





More information about the llvm-commits mailing list