rust/src/tools
bors 158c309513 Auto merge of #110197 - cjgillot:codegen-discr, r=pnkfelix
Do not attempt to commute comparison and cast to codegen discriminants

The general algorithm to compute a discriminant is:
```
relative_tag = tag - niche_start
is_niche = relative_tag <= (ule) relative_max
discr = if is_niche {
    cast(relative_tag) + niche_variants.start()
} else {
    untagged_variant
}
```

We have an optimization branch which attempts to merge the addition and the subtraction by commuting them with the cast. We currently get this optimization wrong.

This PR takes the easiest and safest way: remove the optimization, and let LLVM handle it. (Perf may not agree with that course of action 😅)

There may be a less invasive solution, but I don't have the necessary knowledge of LLVM semantics to find it. Cranelift has the same optimization, which should be handled similarly.
cc `@nikic` and `@bjorn3` if you have a better solution.

Fixes https://github.com/rust-lang/rust/issues/110128
2023-04-14 21:54:56 +00:00
..
build-manifest Add vendor to Fuchsia's target triple 2023-01-05 09:34:22 -05:00
build_helper add only modified for compiletest 2023-02-10 16:25:01 +00:00
bump-stage0 remove some unneeded imports 2023-04-12 19:27:18 +02:00
cargo@84b7041fd2 Update cargo 2023-04-13 22:42:27 +01:00
cargotest Override linker in cargotest on windows 2022-10-23 19:33:03 -05:00
clippy Auto merge of #110160 - petrochenkov:notagain2, r=cjgillot 2023-04-14 01:14:36 +00:00
collect-license-metadata Fix remaining typos 2023-04-10 21:02:49 +02:00
compiletest Rollup merge of #110018 - jfgoog:host-and-target-linker, r=wesleywiser 2023-04-11 20:28:47 -07:00
error_index_generator refactor: improve error-index-generator dependency 2023-02-26 20:13:06 +13:00
expand-yaml-anchors Run expand-yaml-anchors in x test tidy 2023-02-05 14:46:52 -06:00
generate-copyright Fix remaining typos 2023-04-10 21:02:49 +02:00
html-checker parallelize HTML checking tool 2022-07-29 23:26:38 -04:00
jsondocck Fix remaining typos 2023-04-10 21:02:49 +02:00
jsondoclint Fix remaining typos 2023-04-10 21:02:49 +02:00
linkchecker Remove reference from the intra-doc link checker. 2022-11-03 22:02:39 -07:00
lint-docs Collect all matching messages for a lint. 2023-02-28 19:59:01 -08:00
lld-wrapper fix lld-wrapper lld flavor detection 2022-09-07 14:51:54 +02:00
miri Rollup merge of #110072 - joshtriplett:stabilize-is-terminal, r=Mark-Simulacrum 2023-04-13 11:21:00 +02:00
miropt-test-tools couple of clippy::perf fixes 2022-11-18 10:30:47 +01:00
remote-test-client tools/remote-test-{server,client}: Use /data/local/tmp on Android 2022-10-06 13:42:32 -07:00
remote-test-server Use u32 methods instead of manual shifting 2022-12-23 16:08:23 +05:30
replace-version-placeholder Don't skip all directories when tidy-checking 2023-03-27 18:52:47 +00:00
rls Sunset RLS 2022-08-27 21:36:08 -07:00
rust-analyzer ⬆️ rust-analyzer 2023-03-20 08:31:01 +02:00
rust-demangler
rust-installer Rollup merge of #110188 - Nilstrieb:remove-remove-dir-all, r=jyn514 2023-04-12 17:04:32 +02:00
rustbook bump few deps 2023-04-06 18:21:37 +03:00
rustc-workspace-hack Update cargo 2023-03-07 22:19:16 +00:00
rustdoc rustdoc: Use unix_sigpipe instead of rustc_driver::set_sigpipe_handler 2022-10-24 20:40:46 +02:00
rustdoc-gui Add eslint check for rustdoc-gui tester 2023-03-12 15:06:04 +01:00
rustdoc-js rustdoc: add support for type filters in arguments and generics 2023-03-20 22:41:57 -07:00
rustdoc-themes
rustfmt box a bunch of large types 2023-04-04 13:58:50 +00:00
suggest-tests feat: implement basic suggest-tests tool 2023-04-09 19:59:14 +12:00
tidy Auto merge of #110197 - cjgillot:codegen-discr, r=pnkfelix 2023-04-14 21:54:56 +00:00
tier-check Encourage developers not to use periods in target names 2022-11-17 10:41:41 +01:00
unicode-table-generator remove some unneeded imports 2023-04-12 19:27:18 +02:00
unstable-book-gen unstable-book-gen: use std::fs::write 2022-08-28 00:40:58 +02:00
x make x look for x.py if shell script does not exist 2023-02-15 15:19:49 +08:00
cherry-pick.sh
publish_toolstate.py rename maybe_delink to maybe_remove_mention 2023-04-11 14:04:50 +02:00