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

Francois Pichet pichet2000 at gmail.com
Wed Mar 2 07:26:30 PST 2011


On Wed, Mar 2, 2011 at 7:48 AM, Erik Olofsson <Erik.Olofsson at hansoft.se> wrote:
>> -----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.
>

Hi,

I have a Intel Q6600 which is quadcore without hyper threading.
When I do a build my CPU utilization is maxed at 100% (on the 4 core)
almost all the time.

What value do you have for "maximum number of parallel project build"
in your visual studio options?  (here: http://tinyurl.com/5wrqczs)

I suspect your value is not equal to the maximum you could put. That
would explain the difference you get. Put 16 there and redo your tests
with and without your patch.

I think that for LLVM it is better to configure multiprocessor msvc
build using that option instead  of the /MP switch.




More information about the llvm-commits mailing list