danix800 added a comment. In D158872#4626272 <https://reviews.llvm.org/D158872#4626272>, @sammccall wrote:
> In D158872#4626095 <https://reviews.llvm.org/D158872#4626095>, @aaron.ballman > wrote: > >> Out of curiosity, are you testing on Windows with MSVC? My understanding on >> build time performance impacts was that it's debug builds with MSVC that get >> hit especially hard. (I can test that setup but I could use some help >> figuring out how you tested compile times so I can do a similar test instead >> of something totally different from what you tried.) > > I'm not :-( I don't have a windows machine, and the VM I used to have has > bitrotted beyond repair (not sure how useful benchmarks from there would be > anyway). > > This is with clang on linux, just running `time clang-check-14 > include/clang/ASTMatchers/ASTMatchers.h` a few times. > The "deps only" test was `#if 0` ing out all the code in `ASTMatcher.h`, and > commenting out the `ASTMatchers/*` includes, and repeating the same. > For object files I just added a dummy `ASTMatchers.cpp` with only `#include > "clang/ASTMatchers/ASTMatchers.h"`. > > I guess the equivalent of clang-check would be `/Zs`, not sure the best way > to feed it the right flags... Thanks for the testing. I can do the windows part with MSVC cl.exe. 1. `ASTMatchers.h`: ~3.5s 2. "Deps only": ~3.2s 3. `ASTMatchers.cpp` obj: 8K $ uname -a MINGW64_NT-10.0-20348 WIN-LH267487PAC 3.3.3-341.x86_64 2022-01-17 11:45 UTC x86_64 Msys $ echo $SHELL /usr/bin/bash $ cat test.ps1 & "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\Hostx64\x64\cl.exe" /permissive- /MP /we"4238" /GS /Zc:preprocessor /W4 /wd"4141" /wd"4146" /wd"4244" /wd"4267" /wd"4291" /wd"4351" /wd"4456" /wd"4457" /wd"4458" /wd"4459" /wd"4503" /wd"4624" /wd"4722" /wd"4100" /wd"4127" /wd"4512" /wd"4505" /wd"4610" /wd"4510" /wd"4702" /wd"4245" /wd"4706" /wd"4310" /wd"4701" /wd"4703" /wd"4389" /wd"4611" /wd"4805" /wd"4204" /wd"4577" /wd"4091" /wd"4592" /wd"4319" /wd"4709" /wd"5105" /wd"4324" /Zc:wchar_t /I"C:\Users\Administrator\source\repos\llvm-project\build-main-vs2022\tools\clang\lib\ASTMatchers" /I"C:\Users\Administrator\source\repos\llvm-project\clang\lib\ASTMatchers" /I"C:\Users\Administrator\source\repos\llvm-project\clang\include" /I"C:\Users\Administrator\source\repos\llvm-project\build-main-vs2022\tools\clang\include" /I"C:\Users\Administrator\source\repos\llvm-project\build-main-vs2022\include" /I"C:\Users\Administrator\source\repos\llvm-project\llvm\include" /Gm- /O2 /Ob2 /Zc:inline /fp:precise /U"NDEBUG" /D "_UNICODE" /D "UNICODE" /D "WIN32" /D "_WINDOWS" /D "_GLIBCXX_ASSERTIONS" /D "_LIBCPP_ENABLE_ASSERTIONS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_SECURE_NO_WARNINGS" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_WARNINGS" /D "_SCL_SECURE_NO_DEPRECATE" /D "_SCL_SECURE_NO_WARNINGS" /D "__STDC_CONSTANT_MACROS" /D "__STDC_FORMAT_MACROS" /D "__STDC_LIMIT_MACROS" /D CMAKE_INTDIR=\"Release\" /errorReport:prompt /WX- /Zc:forScope /GR /Gd /Oi /MD /std:c++17 /EHsc /nologo /Fp"obj.clangASTMatchers.dir\Release\obj.clangASTMatchers.pch" /diagnostics:column /Zc:__cplusplus /bigobj -w14062 /Gw /I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include" /I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\atlmfc\include" /I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt" /I"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\UnitTest\include" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\shared" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\winrt" /I"C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\cppwinrt" /c ..\clang\include\clang\ASTMatchers\ASTMatchers.h /TP $ time powershell ./test.ps1 ASTMatchers.h real 0m3.143s user 0m0.015s sys 0m0.000s Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158872/new/ https://reviews.llvm.org/D158872 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits