Commit graph

4821 commits

Author SHA1 Message Date
bjorn3
43f423262f Sync from rust 00095b3da4 2025-04-04 09:53:05 +00:00
bjorn3
625b8000f7 Allow formatting example/gen_block_iterate.rs 2025-04-01 14:49:15 +00:00
bjorn3
4a49ff0f33 Merge branch 'sync_from_rust' 2025-03-30 16:05:46 +00:00
bjorn3
15dbafa81e Merge commit 'ba315abda7' into sync_cg_clif-2025-03-30 2025-03-30 15:43:48 +00:00
bjorn3
ba315abda7 Fix rustc test suite 2025-03-30 15:01:56 +00:00
bjorn3
66b1f3ba0c Rustup to rustc 1.88.0-nightly (1799887bb 2025-03-29) 2025-03-30 15:01:56 +00:00
bjorn3
8364234af6
Merge pull request #1566 from rust-lang/arm64_fixes
Fix the half and bytecount crates on arm64
2025-03-27 14:50:23 +01:00
bjorn3
1875905a94 Rustup to rustc 1.87.0-nightly (f8c27dfe1 2025-03-24) 2025-03-25 17:14:58 +00:00
bjorn3
7a9c428d82 Sync from rust f8c27dfe1a 2025-03-25 17:10:26 +00:00
Trevor Gross
0b2acddf01 Update compiler-builtins to 0.1.152
Includes the following changes related to unordered atomics:

* Remove element_unordered_atomic intrinsics [1]
* Remove use of `atomic_load_unordered` and undefined behaviour [2]

There are a handful of other small changes, but nothing else
user-visible.

[1]: https://github.com/rust-lang/compiler-builtins/pull/789
[2]: https://github.com/rust-lang/compiler-builtins/pull/790
2025-03-24 00:29:21 +00:00
bjorn3
542dbbdcfe Fix rustc testsuite 2025-03-23 17:36:31 +00:00
bjorn3
264e1addfd Rustup to rustc 1.87.0-nightly (b48576b4d 2025-03-22) 2025-03-23 16:26:03 +00:00
bjorn3
086dba2a15 Sync from rust b48576b4db 2025-03-23 16:19:48 +00:00
bors
1986ad7527 Auto merge of #128320 - saethlin:link-me-maybe, r=compiler-errors
Avoid no-op unlink+link dances in incr comp

Incremental compilation scales quite poorly with the number of CGUs. This PR improves one reason for that.

The incr comp process hard-links all the files from an old session into a new one, then it runs the backend, which may just hard-link the new session files into the output directory. Then codegen hard-links all the output files back to the new session directory.

This PR (perhaps unimaginatively) fixes the silliness that ensues in the last step. The old `link_or_copy` implementation would be passed pairs of paths which are already the same inode, then it would blindly delete the destination and re-create the hard-link that it just deleted. This PR lets us skip both those operations. We don't skip the other two hard-links.

`cargo +stage1 b && touch crates/core/main.rs && strace -cfw -elink,linkat,unlink,unlinkat cargo +stage1 b` before and then after on `ripgrep-13.0.0`:
```
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 52.56    0.024950          25       978       485 unlink
 34.38    0.016318          22       727           linkat
 13.06    0.006200          24       249           unlinkat
------ ----------- ----------- --------- --------- ----------------
100.00    0.047467          24      1954       485 total
```
```
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 42.83    0.014521          57       252           unlink
 38.41    0.013021          26       486           linkat
 18.77    0.006362          25       249           unlinkat
------ ----------- ----------- --------- --------- ----------------
100.00    0.033904          34       987           total
```

This reduces the number of hard-links that are causing perf troubles, noted in https://github.com/rust-lang/rust/issues/64291 and https://github.com/rust-lang/rust/issues/137560
2025-03-21 21:03:49 +00:00
bjorn3
91ae8651ae Rustup to rustc 1.87.0-nightly (78948ac25 2025-03-20) 2025-03-21 09:52:08 +00:00
bjorn3
4811369acc Sync from rust 78948ac259 2025-03-21 09:46:53 +00:00
bjorn3
2133fb94b7 Disable PIC when jitting
This fixes jitting on non-x86_64 targets.
2025-03-20 15:37:38 +00:00
bjorn3
15fff5d2d2 Update to Cranelift 0.118 2025-03-20 15:37:34 +00:00
bjorn3
a8311b4a46 Temporarily disable FreeBSD testing 2025-03-20 14:08:02 +00:00
bjorn3
ce57133ad1 Update LLVM intrinsic name
This got updated in rust-lang/stdarch@13219b5
2025-03-20 13:59:01 +00:00
bjorn3
8fb99bcb10 Fix implementation of vaddlvq_u8 2025-03-20 13:54:08 +00:00
bjorn3
b9e67a2e28 Enable target features in inline asm on arm64 2025-03-20 13:50:13 +00:00
bjorn3
cb4a25ca81 Remove liballoc compiler-builtins f16/f128 disable patch
We already build with the compiler-builtins-no-f16-f128 feature enabled.
2025-03-18 14:49:15 +00:00
bjorn3
1adce908c6 Run alloctests tests too 2025-03-18 09:52:12 +00:00
bjorn3
ebef14a7b6 Reuse the Cargo.lock of the library workspace for coretests 2025-03-18 09:46:49 +00:00
bjorn3
93a9102a06 Rustup to rustc 1.87.0-nightly (43a2e9d2c 2025-03-17) 2025-03-18 09:01:19 +00:00
bjorn3
e69d216ab9 Sync from rust 43a2e9d2c7 2025-03-18 08:53:49 +00:00
bjorn3
3270d71cec Remove implicit #[no_mangle] for #[rustc_std_internal_symbol] 2025-03-17 14:08:09 +00:00
bjorn3
92e5c1a44d
Merge pull request #1564 from rust-lang/fix_arm64_asm_vector_regs
Fix usage of vector registers in inline asm on arm64
2025-03-16 18:01:11 +01:00
bjorn3
5bb37b7580 Fix usage of vector registers in inline asm on arm64 2025-03-16 14:55:32 +00:00
许杰友 Jieyou Xu (Joe)
a2797e514b Rollup merge of #138082 - thaliaarchi:slice-cfg-not-test, r=thomcc
Remove `#[cfg(not(test))]` gates in `core`

These gates are unnecessary now that unit tests for `core` are in a separate package, `coretests`, instead of in the same files as the source code. They previously prevented the two `core` versions from conflicting with each other.
2025-03-16 09:40:05 +08:00
Ralf Jung
025eecc3e7 atomic intrinsics: clarify which types are supported and (if applicable) what happens with provenance 2025-03-13 08:14:34 +01:00
bjorn3
eea0db2590 Fix rustc test suite 2025-03-12 13:18:52 +00:00
bjorn3
d2b328e6b3 Reduce verbosity of ./scripts/rustup.sh pull 2025-03-12 13:08:50 +00:00
bjorn3
4ca551cf41 Rustup to rustc 1.87.0-nightly (665025243 2025-03-11) 2025-03-12 13:08:42 +00:00
bjorn3
11565c3471 Sync from rust 6650252439 2025-03-12 13:02:12 +00:00
Ralf Jung
56715d9864 intrinsics: remove unnecessary leading underscore from argument names 2025-03-12 08:04:09 +01:00
bors
43a25a5ec6 Auto merge of #128440 - oli-obk:defines, r=lcnr
Add `#[define_opaques]` attribute and require it for all type-alias-impl-trait sites that register a hidden type

Instead of relying on the signature of items to decide whether they are constraining an opaque type, the opaque types that the item constrains must be explicitly listed.

A previous version of this PR used an actual attribute, but had to keep the resolved `DefId`s in a side table.

Now we just lower to fields in the AST that have no surface syntax, instead a builtin attribute macro fills in those fields where applicable.

Note that for convenience referencing opaque types in associated types from associated methods on the same impl will not require an attribute. If that causes problems `#[defines()]` can be used to overwrite the default of searching for opaques in the signature.

One wart of this design is that closures and static items do not have generics. So since I stored the opaques in the generics of functions, consts and methods, I would need to add a custom field to closures and statics to track this information. During a T-types discussion we decided to just not do this for now.

fixes #131298
2025-03-11 18:13:31 +00:00
bors
5a44fffc33 Auto merge of #137586 - nnethercote:SetImpliedBits, r=bjorn3
Speed up target feature computation

The LLVM backend calls `LLVMRustHasFeature` twice for every feature. In short-running rustc invocations, this accounts for a surprising amount of work.

r? `@bjorn3`
2025-03-11 12:05:16 +00:00
Oli Scherer
d9de94001a Implement #[define_opaque] attribute for functions. 2025-03-11 12:05:02 +00:00
bjorn3
540565e5b9 Fully test the alloc crate through alloctests
For the tests that make use of internal implementation details, we
include the module to test using #[path] in alloctests now.
2025-03-07 19:11:13 +00:00
Thalia Archibald
fd3fb2cf46 Remove #[cfg(not(test))] gates in core
These gates are unnecessary now that unit tests for `core` are in a
separate package, `coretests`, instead of in the same files as the
source code. They previously prevented the two `core` versions from
conflicting with each other.
2025-03-06 13:21:59 -08:00
bjorn3
4b7bcdbf9f Use the github cli to publish dev releases
This removes a whole bunch of complicated javascript with two lines of
bash.

Fixes rust-lang/rustc_codegen_cranelift#1562
2025-03-06 14:43:29 +00:00
bjorn3
aa31d42b39 Remove no longer necessary disabling of dylib usage for run-make tests
Run-make tests are now fully compiled using the bootstrap compiler.
2025-03-06 12:51:22 +00:00
bjorn3
75109ec1ba FIx rustc test suite 2025-03-06 12:46:54 +00:00
bjorn3
f048c45018 Rustup to rustc 1.87.0-nightly (30f168ef8 2025-03-05) 2025-03-06 12:40:11 +00:00
bjorn3
41b355ac4b Sync from rust 30f168ef81 2025-03-06 12:16:04 +00:00
bjorn3
7eb0a99fc9 Fix jit mode testing 2025-03-05 15:55:41 +00:00
bjorn3
5cdb866356 Update rust-analyzer config
mod_bench no longer exists and there is no benefit to not having a
sysroot available for mini_core and mini_core_hello_world.
2025-03-05 15:51:35 +00:00
bjorn3
5d03df9431 Remove support for the lazy jit mode
I might re-implement it in the future, but would probably do so by
replacing cranelift-jit. cranelift-jit's api doesn't quite work well for
lazy jitting. And even so it adds complexity to cranelift-jit and breaks
cranelift-jit outside of x86_64.
2025-03-05 15:37:10 +00:00