Skip to content

Subtree sync for rustc_codegen_cranelift #118279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Nov 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
497c17a
Add check-cfg to cranelift
Mark-Simulacrum Nov 14, 2023
dfc669b
Merge commit 'def04540a4e2541b995195c752c751295606a388' into sync_cg_…
bjorn3 Nov 16, 2023
db12abf
Merge branch 'sync_from_rust'
bjorn3 Nov 16, 2023
97ca520
check-cfg needs -Zunstable-options
bjorn3 Nov 16, 2023
cd7218a
Update Cranelift to 0.102
bjorn3 Nov 11, 2023
a5fcfad
Fix _mm_sad_epu8 implementation
bjorn3 Nov 21, 2023
4ae6586
Fix fn_sig_for_fn_abi and the coroutine transform for generators
bjorn3 Nov 23, 2023
430ab4e
Allow function pointers in CValue::const_val
bjorn3 Nov 24, 2023
9c95819
Fix polymorphization for coroutines
bjorn3 Nov 24, 2023
3ec8d7a
Implement _mm_cmpestri and _mm_cmpestrm using inline asm
bjorn3 Nov 12, 2023
705031d
Implement _mm_cvttps_epi32
bjorn3 Nov 24, 2023
65da671
Implement *fmaddsub_p*, *fmsubadd_p* and *fnmadd_p* vendor intrinsics
bjorn3 Nov 24, 2023
c8729e9
Implement _mm256_zeroupper vendor intrinsic
bjorn3 Nov 24, 2023
d5a7ae7
Implement the float part of the gather family vendor intrinsics
bjorn3 Nov 24, 2023
3b49b9e
Implement the int part of the gather family vendor intrinsics
bjorn3 Nov 24, 2023
e6e2f00
Fix incorrect implementation of several vendor intrinsics
bjorn3 Nov 25, 2023
85c7081
Sync from rust 37b2813a7be580ef59048a6bd08444c79e5cc97f
bjorn3 Nov 25, 2023
da3782a
Rustup to rustc 1.76.0-nightly (37b2813a7 2023-11-24)
bjorn3 Nov 25, 2023
86fc533
Re-enable rustc test that was disabled due to a rustc bug
bjorn3 Nov 25, 2023
710c679
Merge pull request #1431 from rust-lang/even_more_simd_intrinsics
bjorn3 Nov 25, 2023
aa51a27
Merge commit '710c67909d034e1c663174a016ca82b95c2d6c12' into sync_cg_…
bjorn3 Nov 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions compiler/rustc_codegen_cranelift/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6"

[[package]]
name = "arbitrary"
version = "1.3.0"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2d098ff73c1ca148721f37baad5ea6a465a13f9573aba8641fbbbae8164a54e"
checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110"

[[package]]
name = "bitflags"
Expand All @@ -45,18 +45,18 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"

[[package]]
name = "cranelift-bforest"
version = "0.101.2"
version = "0.102.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f773437307980ac0f424bf9b9a5d0cd21a0f17248c6860c9a65bec8b5975f3fe"
checksum = "76eb38f2af690b5a4411d9a8782b6d77dabff3ca939e0518453ab9f9a4392d41"
dependencies = [
"cranelift-entity",
]

[[package]]
name = "cranelift-codegen"
version = "0.101.2"
version = "0.102.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "443c2ac50e97fb7de1a0f862753fce3f27215558811a6fcee508eb0c3747fa79"
checksum = "39526c036b92912417e8931f52c1e235796688068d3efdbbd8b164f299d19156"
dependencies = [
"bumpalo",
"cranelift-bforest",
Expand All @@ -75,39 +75,39 @@ dependencies = [

[[package]]
name = "cranelift-codegen-meta"
version = "0.101.2"
version = "0.102.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c5b174c411480c79ce0793c55042fa51bec27e486381d103a53cab3b480cb2db"
checksum = "fdb0deedc9fccf2db53a5a3c9c9d0163e44143b0d004dca9bf6ab6a0024cd79a"
dependencies = [
"cranelift-codegen-shared",
]

[[package]]
name = "cranelift-codegen-shared"
version = "0.101.2"
version = "0.102.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73fa0151a528066a369de6debeea4d4b23a32aba68b5add8c46d3dc8091ff434"
checksum = "cea2d1b274e45aa8e61e9103efa1ba82d4b5a19d12bd1fd10744c3b7380ba3ff"

[[package]]
name = "cranelift-control"
version = "0.101.2"
version = "0.102.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8adf1e6398493c9bea1190e37d28a0eb0eca5fddbc80e01e506cda34db92b1f"
checksum = "6ea5977559a71e63db79a263f0e81a89b996e8a38212c4281e37dd1dbaa8b65c"
dependencies = [
"arbitrary",
]

[[package]]
name = "cranelift-entity"
version = "0.101.2"
version = "0.102.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4917e2ed3bb5fe87d0ed88395ca6d644018d119a034faedd1f3e1f2c33cd52b2"
checksum = "2f871ada808b58158d84dfc43a6a2e2d2756baaf4ed1c51fd969ca8330e6ca5c"

[[package]]
name = "cranelift-frontend"
version = "0.101.2"
version = "0.102.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9aaadf1e7cf28886bbf046eaf7ef538997bc8a7e020e578ea4957b39da87d5a1"
checksum = "e8e6890f587ef59824b3debe577e68fdf9b307b3808c54b8d93a18fd0b70941b"
dependencies = [
"cranelift-codegen",
"log",
Expand All @@ -117,15 +117,15 @@ dependencies = [

[[package]]
name = "cranelift-isle"
version = "0.101.2"
version = "0.102.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a67fda31b9d69eaa1c49a2081939454c45857596a9d45af6744680541c628b4c"
checksum = "a8d5fc6d5d3b52d1917002b17a8ecce448c2621b5bf394bb4e77e2f676893537"

[[package]]
name = "cranelift-jit"
version = "0.101.2"
version = "0.102.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6bf32710628e7ff298739f1ed80a0bfdafc0c6a3e284c4540b23f18e8889d4b"
checksum = "e8a2d7744f743f59d9646d7589ad22ea17ed0d71e04906eb77c31e99bc13bd8b"
dependencies = [
"anyhow",
"cranelift-codegen",
Expand All @@ -143,9 +143,9 @@ dependencies = [

[[package]]
name = "cranelift-module"
version = "0.101.2"
version = "0.102.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d693e93a0fbf56b4bc93cffe6b107c2e52f070e1111950505fc8c83ac440b9d"
checksum = "b96cb196334698e612c197d7d0ae59af5e07667306ec20d7be414717db400873"
dependencies = [
"anyhow",
"cranelift-codegen",
Expand All @@ -154,9 +154,9 @@ dependencies = [

[[package]]
name = "cranelift-native"
version = "0.101.2"
version = "0.102.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76fb52ba71be98312f35e798d9e98e45ab2586f27584231bf7c644fa9501e8af"
checksum = "3e10c2e7faa65d4ae7de9a83b44f2c31aca7dc638e17d0a79572fdf8103d720b"
dependencies = [
"cranelift-codegen",
"libc",
Expand All @@ -165,9 +165,9 @@ dependencies = [

[[package]]
name = "cranelift-object"
version = "0.101.2"
version = "0.102.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2551b2e185022b89e9efa5e04c0f17f679b86ef73d9f7feabc48b608ff23120d"
checksum = "83ce94e18756058af8a66e3c0ba1123ae15517c72162d8060d0cb0974642adf2"
dependencies = [
"anyhow",
"cranelift-codegen",
Expand Down Expand Up @@ -295,9 +295,9 @@ checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"

[[package]]
name = "regalloc2"
version = "0.9.2"
version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b4dcbd3a2ae7fb94b5813fa0e957c6ab51bf5d0a8ee1b69e0c2d0f1e6eb8485"
checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6"
dependencies = [
"hashbrown 0.13.2",
"log",
Expand Down Expand Up @@ -374,9 +374,9 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"

[[package]]
name = "wasmtime-jit-icache-coherence"
version = "14.0.2"
version = "15.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0980a96b16abbdaf829858d2389697b1d6cfc6a903873fd74b7e47a6b1045584"
checksum = "b73ad1395eda136baec5ece7e079e0536a82ef73488e345456cc9b89858ad0ec"
dependencies = [
"cfg-if",
"libc",
Expand Down
12 changes: 6 additions & 6 deletions compiler/rustc_codegen_cranelift/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ crate-type = ["dylib"]

[dependencies]
# These have to be in sync with each other
cranelift-codegen = { version = "0.101.2", default-features = false, features = ["std", "unwind", "all-arch"] }
cranelift-frontend = { version = "0.101.2" }
cranelift-module = { version = "0.101.2" }
cranelift-native = { version = "0.101.2" }
cranelift-jit = { version = "0.101.2", optional = true }
cranelift-object = { version = "0.101.2" }
cranelift-codegen = { version = "0.102", default-features = false, features = ["std", "unwind", "all-arch"] }
cranelift-frontend = { version = "0.102" }
cranelift-module = { version = "0.102" }
cranelift-native = { version = "0.102" }
cranelift-jit = { version = "0.102", optional = true }
cranelift-object = { version = "0.102" }
target-lexicon = "0.12.0"
gimli = { version = "0.28", default-features = false, features = ["write"]}
object = { version = "0.32", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }
Expand Down
5 changes: 5 additions & 0 deletions compiler/rustc_codegen_cranelift/build_system/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ const BASE_SYSROOT_SUITE: &[TestCase] = &[
TestCase::build_bin_and_run("aot.mod_bench", "example/mod_bench.rs", &[]),
TestCase::build_bin_and_run("aot.issue-72793", "example/issue-72793.rs", &[]),
TestCase::build_bin("aot.issue-59326", "example/issue-59326.rs"),
TestCase::custom("aot.polymorphize_coroutine", &|runner| {
runner.run_rustc(&["example/polymorphize_coroutine.rs", "-Zpolymorphize"]);
runner.run_out_command("polymorphize_coroutine", &[]);
}),
TestCase::build_bin_and_run("aot.neon", "example/neon.rs", &[]),
TestCase::custom("aot.gen_block_iterate", &|runner| {
runner.run_rustc([
Expand Down Expand Up @@ -466,6 +470,7 @@ impl<'a> TestRunner<'a> {
cmd.arg("--target");
cmd.arg(&self.target_compiler.triple);
cmd.arg("-Cpanic=abort");
cmd.arg("-Zunstable-options");
cmd.arg("--check-cfg=cfg(no_unstable_features)");
cmd.arg("--check-cfg=cfg(jit)");
cmd.args(args);
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_codegen_cranelift/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ aot.float-minmax-pass
aot.mod_bench
aot.issue-72793
aot.issue-59326
aot.polymorphize_coroutine
aot.neon
aot.gen_block_iterate

Expand Down
16 changes: 16 additions & 0 deletions compiler/rustc_codegen_cranelift/example/polymorphize_coroutine.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#![feature(coroutines, coroutine_trait)]

use std::ops::Coroutine;
use std::pin::Pin;

fn main() {
run_coroutine::<i32>();
}

fn run_coroutine<T>() {
let mut coroutine = || {
yield;
return;
};
Pin::new(&mut coroutine).resume(());
}
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_cranelift/rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2023-11-16"
channel = "nightly-2023-11-25"
components = ["rust-src", "rustc-dev", "llvm-tools"]
5 changes: 0 additions & 5 deletions compiler/rustc_codegen_cranelift/scripts/test_rustc_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,6 @@ rm tests/ui/process/nofile-limit.rs # TODO some AArch64 linking issue

rm tests/ui/stdio-is-blocking.rs # really slow with unoptimized libstd

# rustc bugs
# ==========
# https://github.com/rust-lang/rust/pull/116447#issuecomment-1790451463
rm tests/ui/coroutine/gen_block_*.rs

cp ../dist/bin/rustdoc-clif ../dist/bin/rustdoc # some tests expect bin/rustdoc to exist

# prevent $(RUSTDOC) from picking up the sysroot built by x.py. It conflicts with the one used by
Expand Down
Loading