Commit Graph

4393 Commits

Author SHA1 Message Date
bjorn3
747adbdbe8
Merge pull request #1515 from lqd/abi-cafe
enable abi-cafe tests on `aarch64-apple-darwin`
2024-08-05 19:14:01 +02:00
Rémy Rakic
1f19cdf659 mark busted tests for aarch64-apple-darwin and aarch64-unknown-linux-gnu 2024-08-05 16:44:30 +00:00
Rémy Rakic
b3df6dcb60 ensure the download folder exists when running abi-cafe 2024-08-05 16:19:58 +00:00
Ralf Jung
80a7d5f61d nontemporal_store: make sure that the intrinsic is truly just a hint 2024-08-05 10:57:14 +02:00
Rémy Rakic
9ad44ba737 enable abi-cafe tests on aarch64-apple-darwin 2024-08-04 08:44:40 +00:00
bjorn3
395181c9bf
Merge pull request #1523 from rust-lang/update_abi_cafe
Update abi-cafe
2024-08-02 20:20:05 +02:00
bjorn3
e52af665f5 Update abi-cafe
This has found a couple of new abi issues. I also had to disable the
abi-cafe tests for the MinGW target as one of these abi issues causes a
hang and abi-cafe doesn't yet support timeouts.
2024-08-02 18:08:29 +00:00
bjorn3
c48b010845 Implement x86 _mm_sqrt_ss vendor intrinsic 2024-08-02 16:24:08 +02:00
bjorn3
9bad4b620f Fix rustc test suite 2024-08-02 16:06:02 +02:00
bjorn3
7bdafb5f6a Rustup to rustc 1.82.0-nightly (8e86c9567 2024-08-01) 2024-08-02 11:40:01 +00:00
bjorn3
e47c930f08 Sync from rust 8e86c95671 2024-08-02 11:24:34 +00:00
bjorn3
f340c81caa Statically enable a couple of target features always enabled on arm64 macOS
Ring fails to compile when they are not statically enabled when
compiling for macOS.

Fixes rust-lang/rustc_codegen_cranelift#1522
2024-07-31 15:33:58 +02:00
bjorn3
37da264107 Move computation of decorated names out of the create_dll_import_lib method 2024-07-30 10:32:32 +00:00
bjorn3
161d2476d5 Move temp file name generation out of the create_dll_import_lib method 2024-07-30 10:10:41 +00:00
bors
d35f63e303 Auto merge of #125016 - nicholasbishop:bishop-cb-112, r=tgross35
Update compiler_builtins to 0.1.114

The `weak-intrinsics` feature was removed from compiler_builtins in https://github.com/rust-lang/compiler-builtins/pull/598, so dropped the `compiler-builtins-weak-intrinsics` feature from alloc/std/sysroot.

In https://github.com/rust-lang/compiler-builtins/pull/593, some builtins for f16/f128 were added. These don't work for all compiler backends, so add a `compiler-builtins-no-f16-f128` feature and disable it for cranelift and gcc.
2024-07-29 07:41:33 +00:00
Nicholas Bishop
5cd1e8d9ab Update compiler_builtins to 0.1.114
The `weak-intrinsics` feature was removed from compiler_builtins in
https://github.com/rust-lang/compiler-builtins/pull/598, so dropped the
`compiler-builtins-weak-intrinsics` feature from alloc/std/sysroot.

In https://github.com/rust-lang/compiler-builtins/pull/593, some
builtins for f16/f128 were added. These don't work for all compiler
backends, so add a `compiler-builtins-no-f16-f128` feature and disable
it for cranelift and gcc. Also disable it for LLVM targets that don't
support it.
2024-07-28 20:43:07 -04:00
Nicholas Nethercote
ea9f491696 Reformat use declarations.
The previous commit updated `rustfmt.toml` appropriately. This commit is
the outcome of running `x fmt --all` with the new formatting options.
2024-07-29 08:26:52 +10:00
Nicholas Nethercote
b00404e1a1 Update use declarations formatting options.
As decided in rust-lang/compiler-team#750.

Use declarations are currently wildly inconsistent because rustfmt is
quite unopinionated about how they should be formatted. The
`rustfmt.toml` additions makes rustfmt more opinionated, which avoids
the need for any decision when adding new use declarations to a file.

This commit only updates `rustfmt.toml` and
`compiler/rustc_codegen_cranelift/rustfmt.toml`. The next commit will do
the reformatting.
2024-07-29 08:26:08 +10:00
Slanterns
62a0c22ca9 stabilize is_sorted 2024-07-28 03:11:54 +08:00
bjorn3
68b99fcb91 Rustup to rustc 1.82.0-nightly (7c2012d0e 2024-07-26) 2024-07-27 17:22:59 +00:00
bjorn3
aaffce98e2 Sync from rust 7c2012d0ec 2024-07-27 17:16:14 +00:00
bjorn3
39bc103817 Fix rustc test suite 2024-07-25 16:17:24 +00:00
bjorn3
d768359716 Rustup to rustc 1.82.0-nightly (c1a6199e9 2024-07-24) 2024-07-25 15:16:41 +00:00
bjorn3
f73c411ec2 Sync from rust c1a6199e9d 2024-07-25 15:08:19 +00:00
bjorn3
b2e612f204 Update Cranelift to 0.110.1 2024-07-25 14:50:02 +00:00
GnomedDev
486f5b5059 Use Cow<'static, str> for InlineAsmTemplatePiece::String 2024-07-24 21:11:55 +01:00
许杰友 Jieyou Xu (Joe)
f85d741d6f Rollup merge of #127177 - bjorn3:arm64_macos_cg_clif, r=Mark-Simulacrum
Distribute rustc_codegen_cranelift for arm64 macOS

Support for arm64 macOS has been added to rustc_codegen_cranelift recently.

Fixes https://github.com/rust-lang/rustc_codegen_cranelift/issues/1502
2024-07-22 16:44:02 +08:00
beetrees
4fb3c4bf86
Fix handling of large alignments in write_cvalue_maybe_transmute (#1521) 2024-07-21 13:13:58 +02:00
beetrees
b70ad2defd
Remove unneeded libcalls from codegen_i128.rs 2024-07-20 21:18:30 +01:00
bjorn3
b929b68a5b
Remove the RUSTFLAGS enable method from Readme.md
It is a worse option than using `CARGO_PROFILE_DEV_CODEGEN_BACKEND`.
When using `--target` it doesn't apply to build scripts and proc macros.
It also overrides any `RUSTFLAGS` you may have set in an env var or
cargo config.
2024-07-20 15:26:46 +02:00
Matthias Krüger
0c9ba01011 Rollup merge of #127779 - momvart:should_codegen_hook, r=cjgillot
Add a hook for `should_codegen_locally`

This PR lifts the module-local function `should_codegen_locally` to `TyCtxt` as a hook.
In addition to monomorphization, this function is used for checking the dependency of `compiler_builtins` on other libraries. Moving this function to the hooks also makes overriding it possible for the tools that use the rustc interface.
2024-07-20 13:24:52 +02:00
Yuri Astrakhan
c1c13bd07c Avoid ref when using format! in compiler
Clean up a few minor refs in `format!` macro, as it has a performance cost. Apparently the compiler is unable to inline `format!("{}", &variable)`, and does a run-time double-reference instead (format macro already does one level referencing).  Inlining format args prevents accidental `&` misuse.
2024-07-19 14:52:07 -04:00
Trevor Gross
25dce8f92b Rollup merge of #124033 - bjorn3:ar_archive_writer_0_3_0, r=davidtwco
Sync ar_archive_writer to LLVM 18.1.3

From LLVM 15.0.0-rc3. This adds support for COFF archives containing Arm64EC object files and has various fixes for AIX big archive files.
2024-07-16 16:15:13 -05:00
Chai T. Rex
580cdfa6a7 Added project-specific Zed IDE settings
Created `.zed/settings.json` with all the settings from
`.vscode/settings.json`.
2024-07-16 11:14:04 -04:00
Mohammad Omidvar
c01fe3ceac Move compiler_builtin check to the use case 2024-07-15 23:43:52 +00:00
Rémy Rakic
5203b7e10d
Set rustup profile to minimal (#1516) 2024-07-14 16:59:06 +02:00
bjorn3
cceadba338 Merge branch 'sync_from_rust' 2024-07-13 18:40:39 +00:00
bjorn3
d0d2e60886 Merge commit '659243d85c7489412bd0faa1c068d904a6042941' into sync_cg_clif-2024-07-13 2024-07-13 18:39:03 +00:00
bjorn3
659243d85c Fix rustc test suite 2024-07-13 18:38:35 +00:00
bjorn3
739dfcab8e Rustup to rustc 1.81.0-nightly (c6727fc9b 2024-07-12) 2024-07-13 18:32:48 +00:00
bjorn3
f5c3195e92 Nicer error message when using raw-dylib
cc rust-lang/rustc_codegen_cranelift#1510
2024-07-13 13:53:14 +00:00
bjorn3
96fa075225 Fix rustc test suite 2024-07-09 10:46:21 +00:00
bjorn3
7292fa2a90 Update dependencies 2024-07-09 10:40:29 +00:00
bjorn3
344e4ef787 Fix rustc test suite 2024-07-09 10:30:12 +00:00
bjorn3
cf25d25de3 Rustup to rustc 1.81.0-nightly (35b658fb1 2024-07-08) 2024-07-09 10:16:04 +00:00
bjorn3
29bc1a5cc0 Sync from rust 35b658fb10 2024-07-09 10:08:02 +00:00
bors
776ab988c1 Auto merge of #113128 - WaffleLapkin:become_trully_unuwuable, r=oli-obk,RalfJung
Support tail calls in mir via `TerminatorKind::TailCall`

This is one of the interesting bits in tail call implementation — MIR support.

This adds a new `TerminatorKind` which represents a tail call:
```rust
    TailCall {
        func: Operand<'tcx>,
        args: Vec<Operand<'tcx>>,
        fn_span: Span,
    },
```

*Structurally* this is very similar to a normal `Call` but is missing a few fields:
- `destination` — tail calls don't write to destination, instead they pass caller's destination to the callee (such that eventual `return` will write to the caller of the function that used tail call)
- `target` — similarly to `destination` tail calls pass the caller's return address to the callee, so there is nothing to do
- `unwind` — I _think_ this is applicable too, although it's a bit confusing
- `call_source` — `become` forbids operators and is not created as a lowering of something else; tail calls always come from HIR (at least for now)

It might be helpful to read the interpreter implementation to understand what `TailCall` means exactly, although I've tried documenting it too.

-----

There are a few `FIXME`-questions still left, ideally we'd be able to answer them during review ':)

-----

r? `@oli-obk`
cc `@scottmcm` `@DrMeepster` `@JakobDegen`
2024-07-08 04:35:04 +00:00
bjorn3
322c2f6b13 Sync ar_archive_writer to LLVM 18.1.3
From LLVM 15.0.0-rc3. This adds support for COFF archives containing
Arm64EC object files and has various fixes for AIX big archive files.
2024-07-07 16:56:35 +00:00
Maybe Waffle
9978261a6e Support tail calls in mir via TerminatorKind::TailCall 2024-07-07 17:11:04 +02:00
bors
8620e85a1c Auto merge of #123781 - RalfJung:miri-fn-identity, r=oli-obk
Miri function identity hack: account for possible inlining

Having a non-lifetime generic is not the only reason a function can be duplicated. Another possibility is that the function may be eligible for cross-crate inlining. So also take into account the inlining attribute in this Miri hack for function pointer identity.

That said, `cross_crate_inlinable` will still sometimes return true even for `inline(never)` functions:
- when they are `DefKind::Ctor(..) | DefKind::Closure` -- I assume those cannot be `InlineAttr::Never` anyway?
- when `cross_crate_inline_threshold == InliningThreshold::Always`

so maybe this is still not quite the right criterion to use for function pointer identity.
2024-07-04 23:45:56 +00:00