diff options
| author | Jubilee <46493976+workingjubilee@users.noreply.github.com> | 2021-10-07 20:26:09 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-07 20:26:09 -0700 |
| commit | 6c2d4bf3f7df75c60b6d81e9206a58aa30b0f8aa (patch) | |
| tree | 9122ce7a4688f24b3c81c09d51b4a49c3c1534f8 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 2ee06e737208ce1bd1c18df5ea3aba733e6ac2a7 (diff) | |
| parent | a17193dbb931ea0c8b66d82f640385bce8b4929a (diff) | |
| download | rust-6c2d4bf3f7df75c60b6d81e9206a58aa30b0f8aa.tar.gz rust-6c2d4bf3f7df75c60b6d81e9206a58aa30b0f8aa.zip | |
Rollup merge of #87918 - mikebenfield:pr-afdo, r=nikic
Enable AutoFDO. This largely involves implementing the options debug-info-for-profiling and profile-sample-use and forwarding them on to LLVM. AutoFDO can be used on x86-64 Linux like this: rustc -O -Clink-arg='Wl,--no-rosegment' -Cdebug-info-for-profiling main.rs -o main perf record -b ./main create_llvm_prof --binary=main --out=code.prof rustc -O -Cprofile-sample-use=code.prof main.rs -o main2 Now `main2` will have feedback directed optimization applied to it. The create_llvm_prof tool can be obtained from this github repository: https://github.com/google/autofdo The option -Clink-arg='Wl,--no-rosegment' is necessary to avoid lld putting an extra RO segment before the executable code, which would make the binary silently incompatible with create_llvm_prof.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
