about summary refs log tree commit diff
path: root/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2025-02-25 15:25:54 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2025-03-05 09:49:17 +1100
commitb2b94f4a40bde5cf73d1eab50754fe5b657301a2 (patch)
tree8b981bc2bbe1f385cfd1f0e1dd6ed2ea4699fd25 /tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
parentae07d7d368f3487999e68c5c2aa00a9ba2539905 (diff)
downloadrust-b2b94f4a40bde5cf73d1eab50754fe5b657301a2.tar.gz
rust-b2b94f4a40bde5cf73d1eab50754fe5b657301a2.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 'tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions