diff options
| author | bors <bors@rust-lang.org> | 2023-07-31 14:36:09 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-07-31 14:36:09 +0000 |
| commit | 3114eb1fa5c2d68021060dbe013dcf5ca3926a17 (patch) | |
| tree | afffafd67c4d5a96ce863886a3c855ec8435bbae /library/std/src/os/unix/net/tests.rs | |
| parent | b321edd1b2d4bd00c7b4611e8f20a03ee7b77023 (diff) | |
| parent | 142995f15f3d843f7453d2cd875eab4aababd410 (diff) | |
| download | rust-3114eb1fa5c2d68021060dbe013dcf5ca3926a17.tar.gz rust-3114eb1fa5c2d68021060dbe013dcf5ca3926a17.zip | |
Auto merge of #113592 - Kobzol:pgo-script-bolt, r=Mark-Simulacrum
Move BOLT from `bootstrap` to `opt-dist` Currently, we use BOLT to optimize LLVM for x64 Linux. The BOLT instrumentation and optimization step is implemented in `bootstrap`, but it was always quite hacky, because BOLT works quite differently than PGO. Rather than building an instrumented artifact, it takes an already built artifact and instruments it in-place. This is not a good fit for the bootstrap caching mechanism, and it meant that we had to run BOLT "on-the-fly" when packaging LLVM artifacts into the created sysroot. The BOLT code was also really only used by the PGO script (now called `opt-dist`) and nothing else, so it was quite hardcoded for this one single usage. And even if someone wanted to use the `--llvm-bolt-profile-[use/generate]` bootstrap flags outside of the PGO script, they would also need to implement profile gathering, as this is not performed by bootstrap anyway. I think that it could be more practical to move the BOLT logic to the `opt-dist` tool instead. This simplifies bootstrap, removes unneeded implementation of BOLT caching (we will now do it exactly once - no need to check if it has been performed already when bootstrap copies `libLLVM.so` around multiple times) and removes two BOLT-specific bootstrap flags, and also one special case for building LLVM (instead I pass the linker flags with `--set llvm.ldflags` from `opt-dist` now). There are also a few disadvantages to this new approach: - We have to guess/find the path to the built `libLLVM.so` file (but currently this is quite easy, it's just in `stage2/lib`). - We have to provide the BOLT profile externally to bootstrap, so that it is packaged into the reproducible artifacts archive. Doesn't seem like a big deal to me. - We are depending on some inner behavior of boostrap in `opt-dist` (namely, that `libLLVM.so` is hardlinked). But we do that for many other things in the `opt-dist` tool anyway, it's tied quite closely to bootstrap. I would like to go back to my attempts to also use BOLT for `librustc_driver.so`, and I think that it might be a bit simpler if I also do it from the `opt-dist` tool, so this is the first step towards that. Anyway, let me know what you think about this. It's just a refactoring in a way, no big deal. r? bootstrap
Diffstat (limited to 'library/std/src/os/unix/net/tests.rs')
0 files changed, 0 insertions, 0 deletions
