Skip to content
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

Sync rustc_codegen_cranelift #82808

Merged
merged 61 commits into from
Mar 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
2b8f2ac
Indicate both start and end of pass RSS in time-passes output
tgnottingham Jan 25, 2021
a75f9bc
Merge commit 'd556c56f792756dd7cfec742b9f2e07612dc10f4' into sync_cg_…
bjorn3 Feb 1, 2021
eeb75c7
Merge branch 'sync_from_rust'
bjorn3 Feb 1, 2021
02e1fd4
Rollup merge of #81618 - bjorn3:sync_cg_clif-2021-02-01, r=bjorn3
jonas-schievink Feb 1, 2021
d1df92e
Sync from rust d60b29d1ae8147538b8d542f7ffcc03b48e2cbda
bjorn3 Feb 2, 2021
e4ae9ef
Rustup to rustc 1.51.0-nightly (d4e3570db 2021-02-01)
bjorn3 Feb 2, 2021
54523b8
Fix rustc bootstrap test
bjorn3 Jan 22, 2021
5bdc56c
Add a new ABI to support cmse_nonsecure_call
hug-dev Jan 24, 2021
0f861e1
Update Cranelift
bjorn3 Feb 3, 2021
2d3603f
Update dependencies
bjorn3 Feb 3, 2021
decb9b2
Rustfmt
bjorn3 Feb 3, 2021
f36c14f
Sync from rust f4008fe94935d05ffb3a48fc5b7149070bb45550
bjorn3 Feb 9, 2021
176965f
Rustup to rustc 1.52.0-nightly (0fc6756b4 2021-02-08)
bjorn3 Feb 9, 2021
6fe5eac
Update Cranelift
bjorn3 Feb 9, 2021
bfcf97b
Update libc and libloading
bjorn3 Feb 9, 2021
c5dff34
Revert "Update libc and libloading"
bjorn3 Feb 9, 2021
260a5d4
Stabilize str_split_once
jhpratt Feb 9, 2021
94aac0a
Pass around BackendConfig
bjorn3 Feb 12, 2021
658d124
Rustfmt
bjorn3 Feb 12, 2021
9be3936
Use #!/usr/bin/env bash
bjorn3 Feb 14, 2021
87ecdaa
Recognize FreeBSD as OS
bjorn3 Feb 14, 2021
47bc1db
Test FreeBSD on Cirrus CI
bjorn3 Feb 14, 2021
1337f96
Merge pull request #1138 from bjorn3/cirrus_ci
bjorn3 Feb 14, 2021
fe8d11b
Use an ItemId inside mir::GlobalAsm.
cjgillot Jan 30, 2021
c39cb46
Update Cranelift
bjorn3 Feb 18, 2021
92f765f
Remove support for x86 oldBE
bjorn3 Feb 9, 2021
f2f5452
Use real atomic instructions instead of a global lock
bjorn3 Feb 9, 2021
537db9a
Disable 128bit atomic operations on macOS
bjorn3 Feb 18, 2021
702676b
Use a QueryContext for try_mark_green.
cjgillot Jan 18, 2021
92c1b85
Disable stack2reg optimization
bjorn3 Feb 20, 2021
4cfb885
Merge pull request #1140 from bjorn3/no_more_oldbe
bjorn3 Feb 21, 2021
25f7eee
Don't import the metadata symbol
bjorn3 Feb 21, 2021
a8f3877
Don't write clif ir by default when debug assertions are enabled
bjorn3 Feb 21, 2021
b36fd9d
Remove unnecessary parts from alloc_system
bjorn3 Feb 21, 2021
93373e1
Don't build alloc_system as part of the sysroot
bjorn3 Feb 21, 2021
4f45ea7
Re-enable some now compiling libcore tests
bjorn3 Feb 21, 2021
c5f98b5
Remove shift amount masking
bjorn3 Feb 21, 2021
9c98027
Directly use Cranelift instructions for 128bit int shifts
bjorn3 Feb 21, 2021
ee36a1f
Remove workaround for stack_{load,store}.i128 not being implemented
bjorn3 Feb 21, 2021
b0f870e
Fix CI
bjorn3 Feb 21, 2021
74f39b6
Avoid a temporary stackslot in codegen_checked_int_binop
bjorn3 Feb 21, 2021
0610490
Assume constants can't fail to evaluate
bjorn3 Feb 21, 2021
7fc3483
Revert "Remove shift amount masking"
bjorn3 Feb 21, 2021
ecba16f
Various enum to int cast fixes
bjorn3 Feb 21, 2021
4eb6754
Sync from rust 3e826bb11228508fbe749e594038d6727208aa94
bjorn3 Feb 21, 2021
013b3c5
Rustfmt
bjorn3 Feb 21, 2021
a5bf6d2
Rustup to rustc 1.52.0-nightly (83b30a639 2021-02-20)
bjorn3 Feb 21, 2021
d5ac849
Update Cranelift
bjorn3 Feb 22, 2021
b0028fa
Update dependencies
bjorn3 Feb 22, 2021
c247446
Disable macro-error rust-analyzer diagnostic
bjorn3 Feb 23, 2021
ef96a0f
Update Cranelift
bjorn3 Feb 23, 2021
73d3a1c
Use dynamic dispatch for the inner Module
bjorn3 Feb 22, 2021
86c5944
Merge pull request #1144 from bjorn3/dynamic_module
bjorn3 Feb 23, 2021
8b7d335
Rollup merge of #81940 - jhpratt:stabilize-str_split_once, r=m-ou-se
GuillaumeGomez Feb 26, 2021
27a5f4f
Update Cranelift
bjorn3 Mar 1, 2021
7d33e5b
Fix bootstrap test script
bjorn3 Mar 1, 2021
9406510
Sync from rust a0d66b54fb3acc2125972b88ff543a2c04d14af5
bjorn3 Mar 5, 2021
b5f67dc
Rustup to rustc 1.52.0-nightly (45b3c2851 2021-03-04)
bjorn3 Mar 5, 2021
5e73629
Rustfmt
bjorn3 Mar 5, 2021
9a0c329
Disable value debuginfo
bjorn3 Mar 5, 2021
7a6ea77
Merge commit '9a0c32934ebe376128230aa8da3275697b2053e7' into sync_cg_…
bjorn3 Mar 5, 2021
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
25 changes: 25 additions & 0 deletions compiler/rustc_codegen_cranelift/.cirrus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
task:
name: freebsd
freebsd_instance:
image: freebsd-12-1-release-amd64
setup_rust_script:
- pkg install -y curl git bash
- curl https://sh.rustup.rs -sSf --output rustup.sh
- sh rustup.sh --default-toolchain none -y --profile=minimal
cargo_bin_cache:
folder: ~/.cargo/bin
target_cache:
folder: target
prepare_script:
- . $HOME/.cargo/env
- git config --global user.email "user@example.com"
- git config --global user.name "User"
- ./prepare.sh
test_script:
- . $HOME/.cargo/env
- # Enable backtraces for easier debugging
- export RUST_BACKTRACE=1
- # Reduce amount of benchmark runs as they are slow
- export COMPILE_RUNS=2
- export RUN_RUNS=2
- ./test.sh
5 changes: 1 addition & 4 deletions compiler/rustc_codegen_cranelift/.github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
env:
- BACKEND: ""
- BACKEND: --oldbe

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -54,7 +51,7 @@ jobs:
export COMPILE_RUNS=2
export RUN_RUNS=2

./test.sh $BACKEND
./test.sh

- name: Package prebuilt cg_clif
run: tar cvfJ cg_clif.tar.xz build
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_cranelift/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
// source for rustc_* is not included in the rust-src component; disable the errors about this
"rust-analyzer.diagnostics.disabled": ["unresolved-extern-crate"],
"rust-analyzer.diagnostics.disabled": ["unresolved-extern-crate", "macro-error"],
"rust-analyzer.assist.importMergeBehavior": "last",
"rust-analyzer.cargo.loadOutDirsFromCheck": true,
"rust-analyzer.linkedProjects": [
Expand Down
128 changes: 41 additions & 87 deletions compiler/rustc_codegen_cranelift/Cargo.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3

[[package]]
name = "anyhow"
version = "1.0.38"
Expand Down Expand Up @@ -29,18 +31,6 @@ version = "1.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b"

[[package]]
name = "cc"
version = "1.0.66"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48"

[[package]]
name = "cfg-if"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"

[[package]]
name = "cfg-if"
version = "1.0.0"
Expand All @@ -49,16 +39,16 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"

[[package]]
name = "cranelift-bforest"
version = "0.69.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#986b5768f9e68f1564b43f32b8a4080a6582c8ca"
version = "0.70.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058"
dependencies = [
"cranelift-entity",
]

[[package]]
name = "cranelift-codegen"
version = "0.69.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#986b5768f9e68f1564b43f32b8a4080a6582c8ca"
version = "0.70.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058"
dependencies = [
"byteorder",
"cranelift-bforest",
Expand All @@ -75,27 +65,27 @@ dependencies = [

[[package]]
name = "cranelift-codegen-meta"
version = "0.69.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#986b5768f9e68f1564b43f32b8a4080a6582c8ca"
version = "0.70.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058"
dependencies = [
"cranelift-codegen-shared",
"cranelift-entity",
]

[[package]]
name = "cranelift-codegen-shared"
version = "0.69.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#986b5768f9e68f1564b43f32b8a4080a6582c8ca"
version = "0.70.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058"

[[package]]
name = "cranelift-entity"
version = "0.69.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#986b5768f9e68f1564b43f32b8a4080a6582c8ca"
version = "0.70.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058"

[[package]]
name = "cranelift-frontend"
version = "0.69.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#986b5768f9e68f1564b43f32b8a4080a6582c8ca"
version = "0.70.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058"
dependencies = [
"cranelift-codegen",
"log",
Expand All @@ -105,8 +95,8 @@ dependencies = [

[[package]]
name = "cranelift-jit"
version = "0.69.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#986b5768f9e68f1564b43f32b8a4080a6582c8ca"
version = "0.70.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058"
dependencies = [
"anyhow",
"cranelift-codegen",
Expand All @@ -123,8 +113,8 @@ dependencies = [

[[package]]
name = "cranelift-module"
version = "0.69.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#986b5768f9e68f1564b43f32b8a4080a6582c8ca"
version = "0.70.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058"
dependencies = [
"anyhow",
"cranelift-codegen",
Expand All @@ -135,18 +125,17 @@ dependencies = [

[[package]]
name = "cranelift-native"
version = "0.69.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#986b5768f9e68f1564b43f32b8a4080a6582c8ca"
version = "0.70.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058"
dependencies = [
"cranelift-codegen",
"raw-cpuid",
"target-lexicon",
]

[[package]]
name = "cranelift-object"
version = "0.69.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#986b5768f9e68f1564b43f32b8a4080a6582c8ca"
version = "0.70.0"
source = "git+https://github.com/bytecodealliance/wasmtime/?branch=main#cdb60ec5a9df087262ae8960a31067e88cd80058"
dependencies = [
"anyhow",
"cranelift-codegen",
Expand All @@ -162,7 +151,7 @@ version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a"
dependencies = [
"cfg-if 1.0.0",
"cfg-if",
]

[[package]]
Expand Down Expand Up @@ -219,27 +208,27 @@ dependencies = [

[[package]]
name = "libc"
version = "0.2.82"
version = "0.2.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89203f3fba0a3795506acaad8ebce3c80c0af93f994d5a1d7a0b1eeb23271929"
checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c"

[[package]]
name = "libloading"
version = "0.6.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "351a32417a12d5f7e82c368a66781e307834dae04c6ce0cd4456d52989229883"
dependencies = [
"cfg-if 1.0.0",
"cfg-if",
"winapi",
]

[[package]]
name = "log"
version = "0.4.13"
version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcf3805d4480bb5b86070dcfeb9e2cb2ebc148adb753c5cca5f884d1d65a42b2"
checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710"
dependencies = [
"cfg-if 0.1.10",
"cfg-if",
]

[[package]]
Expand All @@ -253,9 +242,9 @@ dependencies = [

[[package]]
name = "object"
version = "0.22.0"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d3b63360ec3cb337817c2dbd47ab4a0f170d285d8e5a2064600f3def1402397"
checksum = "a9a7ab5d64814df0fe4a4b5ead45ed6c5f181ee3ff04ba344313a6c80446c5d4"
dependencies = [
"crc32fast",
"indexmap",
Expand All @@ -272,24 +261,13 @@ dependencies = [

[[package]]
name = "quote"
version = "1.0.8"
version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "991431c3519a3f36861882da93630ce66b52918dcf1b8e2fd66b397fc96f28df"
checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7"
dependencies = [
"proc-macro2",
]

[[package]]
name = "raw-cpuid"
version = "8.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fdf7d9dbd43f3d81d94a49c1c3df73cc2b3827995147e6cf7f89d4ec5483e73"
dependencies = [
"bitflags",
"cc",
"rustc_version",
]

[[package]]
name = "regalloc"
version = "0.0.31"
Expand Down Expand Up @@ -337,30 +315,6 @@ dependencies = [
"target-lexicon",
]

[[package]]
name = "rustc_version"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
dependencies = [
"semver",
]

[[package]]
name = "semver"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
dependencies = [
"semver-parser",
]

[[package]]
name = "semver-parser"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"

[[package]]
name = "smallvec"
version = "1.6.1"
Expand All @@ -369,9 +323,9 @@ checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e"

[[package]]
name = "syn"
version = "1.0.58"
version = "1.0.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc60a3d73ea6594cd712d830cc1f0390fd71542d8c8cd24e70cc54cdfd5e05d5"
checksum = "c700597eca8a5a762beb35753ef6b94df201c81cca676604f547495a0d7f0081"
dependencies = [
"proc-macro2",
"quote",
Expand All @@ -380,24 +334,24 @@ dependencies = [

[[package]]
name = "target-lexicon"
version = "0.11.1"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ee5a98e506fb7231a304c3a1bd7c132a55016cf65001e0282480665870dfcb9"
checksum = "422045212ea98508ae3d28025bc5aaa2bd4a9cdaecd442a08da2ee620ee9ea95"

[[package]]
name = "thiserror"
version = "1.0.23"
version = "1.0.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76cc616c6abf8c8928e2fdcc0dbfab37175edd8fb49a4641066ad1364fdab146"
checksum = "e0f4a65597094d4483ddaed134f409b2cb7c1beccf25201a9f73c719254fa98e"
dependencies = [
"thiserror-impl",
]

[[package]]
name = "thiserror-impl"
version = "1.0.23"
version = "1.0.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9be73a2caec27583d0046ef3796c3794f868a5bc813db689eed00c7631275cd1"
checksum = "7765189610d8241a44529806d6fd1f2e0a08734313a35d5b3a556f92b381f3c0"
dependencies = [
"proc-macro2",
"quote",
Expand Down
5 changes: 2 additions & 3 deletions compiler/rustc_codegen_cranelift/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ crate-type = ["dylib"]

[dependencies]
# These have to be in sync with each other
cranelift-codegen = { git = "https://github.com/bytecodealliance/wasmtime/", branch = "main", features = ["unwind", "x86", "x64"] }
cranelift-codegen = { git = "https://github.com/bytecodealliance/wasmtime/", branch = "main", features = ["unwind", "x64"] }
cranelift-frontend = { git = "https://github.com/bytecodealliance/wasmtime/", branch = "main" }
cranelift-module = { git = "https://github.com/bytecodealliance/wasmtime/", branch = "main" }
cranelift-jit = { git = "https://github.com/bytecodealliance/wasmtime/", branch = "main", optional = true }
cranelift-object = { git = "https://github.com/bytecodealliance/wasmtime/", branch = "main" }
target-lexicon = "0.11.0"
gimli = { version = "0.23.0", default-features = false, features = ["write"]}
object = { version = "0.22.0", default-features = false, features = ["std", "read_core", "write", "coff", "elf", "macho", "pe"] }
object = { version = "0.23.0", default-features = false, features = ["std", "read_core", "write", "coff", "elf", "macho", "pe"] }

ar = { git = "https://github.com/bjorn3/rust-ar.git", branch = "do_not_remove_cg_clif_ranlib" }
indexmap = "1.0.2"
Expand All @@ -38,7 +38,6 @@ smallvec = "1.6.1"
default = ["jit", "inline_asm"]
jit = ["cranelift-jit", "libloading"]
inline_asm = []
oldbe = []

[profile.dev]
# By compiling dependencies with optimizations, performing tests gets much faster.
Expand Down
Loading