Ignore intrinsic calls in cross-crate-inlining cost model
I noticed in a side project that a function which just compares to `[u64; 2]` for equality is not cross-crate-inlinable. That was surprising to me because I didn't think that code contained a function call, but of course our array comparisons are lowered to an intrinsic. Intrinsic calls don't make a function no longer a leaf, so it makes sense to add this as an exception to the "only leaves" cross-crate-inline heuristic.
This is the useful compare link: https://perf.rust-lang.org/compare.html?start=7cb1a81145a739c4fd858abe3c624ce8e6e5f9cd&end=c3f0a64dbf9fba4722dacf8e39d2fe00069c995e&stat=instructions%3Au because it disables CGU merging in both commits, so effects that cause changes in the sysroot to perturb partitioning downstream are excluded. Perturbations to what is and isn't cross-crate-inlinable in the sysroot has chaotic effects on what items are in which CGUs after merging. It looks like before this PR by sheer luck some of the CGUs dirtied by the patch in eza incr-unchanged happened to be merged together, and with this PR they are not.
The perf runs on this PR point to a nice runtime performance improvement.
Reimplement DestinationPropagation according to live ranges.
This PR reimplements DestinationPropagation as a problem of merging live-ranges of locals. We merge locals that have disjoint live-ranges. This allows merging several locals in the same round by updating live range information.
Live ranges are mainly computed using the `MaybeLiveLocals` analysis. The subtlety is that we split each statement and terminator in 2 positions. The first position is the regular statement. The second position is a shadow, which is always more live. It encodes partial writes and dead writes as a local being live for half a statement. This half statement ensures that writes conflict with another local's writes and regular liveness.
r? `@Amanieu`
- Support for atomic fences.
- Support for atomic read-modify-write (RMW).
- Add tests using RMW and fences.
- Add options:
- to disable weak memory effects in GenMC mode.
- to print GenMC execution graphs.
- to print GenMC output message.
- Fix GenMC full rebuild issue and run configure step when commit changes.
- Do cleanup.
Co-authored-by: Ralf Jung <post@ralfj.de>
fix: offline rustdoc html missing favicon
As discussed in the rust-lang/rust#146149 the doc was missing the favicon icon when build locally and viewed on a browser. I changed the relative path and also now we explicitly copy both SVG and PNG.
<img width="1132" height="425" alt="Screenshot 2025-09-03 at 11 57 46 PM" src="https://github.com/user-attachments/assets/062cbb08-04ec-4d88-a43a-710fb6190f82" />
Add amdgpu test for addrspacecasting global vars and the gpu-kernel calling convention
Add two tests that can now be added, as the amdgpu is merged.
- Global variables are casted to the default address space since rust-lang/rust#135026
- gpu-kernel calling convention, translatos to amdgpu_kernel rust-lang/rust#135047
Tracking issue: rust-lang/rust#135024
Miri: non-deterministic floating point operations in foreign_items
Take 2 of rust-lang/rust#143906. The last 2 commits are what changed compared to the original pr.
Verified the tests using (fish shell):
```fish
env MIRIFLAGS="-Zmiri-max-extra-rounding-error -Zmiri-many-seeds" ./x miri --no-fail-fast std core coretests -- f32 f64
```
r? `@RalfJung`
Use `Itertools::all_equal_value()` where applicable
Just a small cleanup.
We already have `itertools` as a dep in these crates, so might as well use another of its features.
Makes the code simpler IMHO :)
lint ImproperCTypes: refactor linting architecture (part 1)
This is the first PR in an effort to split rust-lang/rust#134697 into individually-mergeable parts.
This one focuses on properly packaging the lint and its tests, as well as properly separate the "linting" and "type-checking" code.
There is exactly one user-visible change: the safety of `Option<Box<FFISafePointee>>` is now the same in `extern` blocks and function definitions: it is safe.
r? `@tgross35` because you are already looking at the original
gpu offload: change suspicious map into filter
Fixes clippy warning:
```text
warning: this call to `map()` won't have an effect on the call to `count()`
--> compiler/rustc_codegen_llvm/src/builder/gpu_offload.rs:194:25
|
194 | let num_ptr_types = types
| _________________________^
195 | | .iter()
196 | | .map(|&x| matches!(cx.type_kind(x), rustc_codegen_ssa::common::TypeKind::Pointer))
197 | | .count();
| |________________^
|
= help: make sure you did not confuse `map` with `filter`, `for_each` or `inspect`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_map
= note: `-W clippy::suspicious-map` implied by `-W clippy::suspicious`
= help: to override `-W clippy::suspicious` add `#[allow(clippy::suspicious_map)]`
```
Simplify rustdoc-gui tester by calling directly browser-ui-test
The output and handling of `browser-ui-test` is now mostly the same as we did manually, so no need to keep our wrapper anymore. Lot of code removed! \o/
r? `@lolbinarycat`
Rollup of 5 pull requests
Successful merges:
- rust-lang/rust#139524 (Add socket extensions for cygwin)
- rust-lang/rust#145940 (single buffer for exponent fmt of integers)
- rust-lang/rust#146206 (identity uses are ok, even if there are no defining uses)
- rust-lang/rust#146272 (Update comment for `-Werror` on LLVM builds)
- rust-lang/rust#146280 (Make `LetChainsPolicy` public for rustfmt usage)
r? `@ghost`
`@rustbot` modify labels: rollup
No changes should be visible by rustc users
This is just some architecture changes to the type checking to
facilitate FFI-safety decisions that depend on how the type is used
(the change here is not complete, there are still bits of "legacy" state
passing for this, but since this is a retconned commit, I can tell you
those bits will disappear before the end of the commit chain)
(there is at least one bit where the decision making code is weird, but
that this is because we do not want to change the lint's behaviour this
early in the chain)
no visible changes to rust users, just making the inner architecture of
the ImproperCTypes lints more sensible, with a clean separation between
the struct (now singular) that interacts with the linting system
and the struct (now singular) that visits the types to check FFI-safety