-
-
Notifications
You must be signed in to change notification settings - Fork 268
GitHub Actions: Extend PGO to C++ parts of LDC #3982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
fd03b0f
to
e35cace
Compare
|
Using LTO for the instrumented binary too hasn't gotten rid of those, although the relevant CMake flags should be identical for both instrumented and PGO'd builds now. Perhaps due to vanilla clang 14.0.0 vs. LDC-LLVM v14.0.3?! |
Ah, so |
004e093
to
2335c2d
Compare
Sorry for not being able to help you with the issues. But yes, I did not reinvent anything new, the LDC commandline options are meant to do exactly the thing that clang does. |
There are some WTF moments here. So first of all, using vanilla clang 14 as C(++) compiler for the macOS jobs worked fine, even for arm64 cross-compilation. I was expecting trouble with the Xcode SDK, but the only problem was that it's somehow using For Windows, instrumentation works fine, but the C++ parts don't actually make use of the profile later on, due to the filed clang-cl oversight. The unsupported cmdline switch is only a warning, not an error, so it'll automatically work as soon as clang-cl supports it. So everything was looking pretty great, until I tried a CI run without assertions. Windows is still fine, but on Linux and macOS x86_64, there are now lots of hash mismatches, apparently just for the D parts. |
Okay, that's sorted now too; those hash mismatches originated from the D parts of the ldc2-unittest executable, which don't use the PGO profiles anymore now. |
For some Symmetry code and a Linux debug build, I'm seeing some ~1% reduction in compile times over frontend-PGO only. |
As DFLAGS_LDC affect the ldc2-unittest executable too, which is built without optimizations (but with `-g -unittest`).
[on top of #3980]