diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-02-25 15:25:54 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2025-03-05 09:49:17 +1100 |
| commit | 157137a64aeba7fb6e6571bcc046c97d63d368a7 (patch) | |
| tree | 4c786f189a2f70c80e2522aa62fe00d70a15f39d /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | ee5bae8a12f87e994e0ad19ecc3e387aa69b8ec1 (diff) | |
| download | rust-157137a64aeba7fb6e6571bcc046c97d63d368a7.tar.gz rust-157137a64aeba7fb6e6571bcc046c97d63d368a7.zip | |
Change signature of `target_features_cfg`.
Currently it is called twice, once with `allow_unstable` set to true and once with it set to false. This results in some duplicated work. Most notably, for the LLVM backend, `LLVMRustHasFeature` is called twice for every feature, and it's moderately slow. For very short running compilations on platforms with many features (e.g. a `check` build of hello-world on x86) this is a significant fraction of runtime. This commit changes `target_features_cfg` so it is only called once, and it now returns a pair of feature sets. This halves the number of `LLVMRustHasFeature` calls.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
