[cfe-dev] Clang on Windows targteing gcc compiles very slowly

Dennis Luehring dl.soluz at gmx.net
Sat May 30 22:42:43 PDT 2015


use Intel VTune (Trial runs for 15/30 days - 
https://software.intel.com/en-us/intel-vtune-amplifier-xe/try-buy) - 
very easy to use

Am 31.05.2015 um 05:36 schrieb Edward Diener:
> On 5/30/2015 8:02 PM, Jonathan Roelofs wrote:
> >
> >
> > On 5/30/15 9:20 AM, Edward Diener wrote:
> >> On 5/30/2015 10:30 AM, Reid Kleckner wrote:
> >>> You said you configured in release mode, but assertions might still be
> >>> on. That accounts for a 2x slowdown.
> >>
> >> LLVM_ENABLE_ASSERTIONS is off.
> >
> > Can you run it in a profiler and tell us what's slow about it for your
> > benchmark? We don't have a lot of information to work with here. A flame
> > graph would probably be the most useful.
>
> I never met a code profiler I liked ( Rogers Will, aka myself ).
>
> Care to recommend one with decent instructions which I can actually
> use/understand to profile the clang++.exe when I try to compile a test
> of a particular Boost library ?
>
> Is it possible that the general slowness of clang on Windows targeting
> gcc comes from some CMake build parameter ? I notice a ton of them for
> llvm/clang when I use the CMake GUI to configure and generate my clang
> build. It seems that a number of them are turned on by default. Perhaps
> many are not necessary. I also find it very difficult to find any
> documentation about the llvm/clang build parameters. Are there page(s)
> that document what they are and why they should be used ? For instance I
> see that CLANG_ENABLE_ARCMT and CLANG_ENABLE_STATIC_ANALYZER are on by
> default. Could either of these be slowing down the clang compile
> considerably ? Likewise for llvm I see that LLVM_ENABLE_BACKTRACES,
> LLVM_ENABLE_CRASH_OVERRIDES, LLVM_ENABLE_PEDANTIC, LLVM_ENABLE_PIC,
> LLVM_ENABLE_TERMINFO, LLVM_ENABLE_TIMESTAMPS, LLVM_ENABLE_WARNINGS, and
> LLVM_ENABLE_ZLIB arw all on by default. Can either of these be slowing
> down clang ?
>
> >
> >
> > Jon
> >
> >>
> >>> Otherwise I'd say that we haven't
> >>> profiled and optimized clang on windows very much.
> >>>
> >>> Sent from phone
> >>>
> >>> On May 29, 2015 4:51 PM, "Edward Diener"
> >>> <eldlistmailingz at tropicsoft.com
> >>> <mailto:eldlistmailingz at tropicsoft.com>> wrote:
> >>>
> >>>     I test Boost libraries mostly on Windows using various version of
> >>>     gcc 4.3 and up, VC++ 8.0 and up, and the latest version of clang
> >>>     which I build from source using mingw/gcc-4.8.1 in release mode.
> >>>
> >>>     While clang is a great compiler when it comes to testing code,
> >>>     getting intelligent error message, and implementing the latest C++
> >>>     standard, it is noticably slower ( 2x or 3x at minimum ) than the
> >>>     other compilers I use.
> >>>
> >>>     The clang command line parameters usually being used are usually
> >>>     along the lines of:
> >>>
> >>>     -c -x c++ -O0 -g -fno-inline -Wall -g -march=i686 -m32
> >>>
> >>>     with the addition of 'std=c++11' occasionally depending on the test.
> >>>
> >>>     Does anybody have any idea why clang is so much slower than any of
> >>>     the other compilers I use ? It does not seem to matter whether it is
> >>>     in C++03 mode or C++11 mode, it is noticeably slower than the other
> >>>     compilers.
> >>
> >>
> >> _______________________________________________
> >> cfe-dev mailing list
> >> cfe-dev at cs.uiuc.edu
> >> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
> >
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list