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

Erik Olofsson Erik.Olofsson at hansoft.se
Wed Mar 2 08:00:09 PST 2011



> -----Original Message-----
> From: Francois Pichet [mailto:pichet2000 at gmail.com]
> > 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)

16, and as you can see from the graph, during some parts of the build the CPU utilization is close to 100%

> 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.

That may be true for your processor, but as it doesn't hurt performance and the tendency is for the number of cores to increase going forward I think it's worthwhile.

>From your statements it sounds like you actually have /MP enabled without the patch. Otherwise in the beginning of the project it would only use one core when it compiles LLVMSupport project which everything else is dependent on. Could you check (Properties->Configuration Properties->C/C++->Multi-Processor Compilation) on project generated without the patch to see what it is set to?

Which version of CMake are you using, it might have another default?
You could have configured /MP in your Microsoft.Cpp.Win32.user.props file?

Regards,
Erik




More information about the llvm-commits mailing list