Update to Cranelift 0.88.0

This commit is contained in:
bjorn3 2022-09-25 15:49:44 +00:00
parent 7dccb51fe3
commit 72992c483c
4 changed files with 47 additions and 31 deletions

58
Cargo.lock generated
View File

@ -24,6 +24,12 @@ name = "ar"
version = "0.8.0"
source = "git+https://github.com/bjorn3/rust-ar.git?branch=do_not_remove_cg_clif_ranlib#de9ab0e56bf3a208381d342aa5b60f9ff2891648"
[[package]]
name = "arrayvec"
version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6"
[[package]]
name = "autocfg"
version = "1.1.0"
@ -36,6 +42,12 @@ version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bumpalo"
version = "3.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d"
[[package]]
name = "byteorder"
version = "1.4.3"
@ -50,19 +62,21 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "cranelift-bforest"
version = "0.87.0"
version = "0.88.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93945adbccc8d731503d3038814a51e8317497c9e205411820348132fa01a358"
checksum = "b27bbd3e6c422cf6282b047bcdd51ecd9ca9f3497a3be0132ffa08e509b824b0"
dependencies = [
"cranelift-entity",
]
[[package]]
name = "cranelift-codegen"
version = "0.87.0"
version = "0.88.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b482acc9d0d0d1ad3288a90a8150ee648be3dce8dc8c8669ff026f72debdc31"
checksum = "872f5d4557a411b087bd731df6347c142ae1004e6467a144a7e33662e5715a01"
dependencies = [
"arrayvec",
"bumpalo",
"cranelift-bforest",
"cranelift-codegen-meta",
"cranelift-codegen-shared",
@ -77,30 +91,30 @@ dependencies = [
[[package]]
name = "cranelift-codegen-meta"
version = "0.87.0"
version = "0.88.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9ec188d71e663192ef9048f204e410a7283b609942efc9fcc77da6d496edbb8"
checksum = "21b49fdebb29c62c1fc4da1eeebd609e9d530ecde24a9876def546275f73a244"
dependencies = [
"cranelift-codegen-shared",
]
[[package]]
name = "cranelift-codegen-shared"
version = "0.87.0"
version = "0.88.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ad794b1b1c2c7bd9f7b76cfe0f084eaf7753e55d56191c3f7d89e8fa4978b99"
checksum = "5fc0c091e2db055d4d7f6b7cec2d2ead286bcfaea3357c6a52c2a2613a8cb5ac"
[[package]]
name = "cranelift-entity"
version = "0.87.0"
version = "0.88.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "342da0d5056f4119d3c311c4aab2460ceb6ee6e127bb395b76dd2279a09ea7a5"
checksum = "354a9597be87996c9b278655e68b8447f65dd907256855ad773864edee8d985c"
[[package]]
name = "cranelift-frontend"
version = "0.87.0"
version = "0.88.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dfff792f775b07d4d9cfe9f1c767ce755c6cbadda1bbd6db18a1c75ff9f7376a"
checksum = "0cd8dd3fb8b82c772f4172e87ae1677b971676fffa7c4e3398e3047e650a266b"
dependencies = [
"cranelift-codegen",
"log",
@ -110,15 +124,15 @@ dependencies = [
[[package]]
name = "cranelift-isle"
version = "0.87.0"
version = "0.88.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d51089478849f2ac8ef60a8a2d5346c8d4abfec0e45ac5b24530ef9f9499e1e"
checksum = "b82527802b1f7d8da288adc28f1dc97ea52943f5871c041213f7b5035ac698a7"
[[package]]
name = "cranelift-jit"
version = "0.87.0"
version = "0.88.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "095936e41720f86004b4c57ce88e6a13af28646bb3a6fb4afbebd5ae90c50029"
checksum = "54a6d007394ef18312fc6616fb99618844f13dff01edbbbc4a451c2b7cd5c8f4"
dependencies = [
"anyhow",
"cranelift-codegen",
@ -134,9 +148,9 @@ dependencies = [
[[package]]
name = "cranelift-module"
version = "0.87.0"
version = "0.88.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "704a1aea4723d97eafe0fb7af110f6f6868b1ac95f5380bbc9adb2a3b8cf97e8"
checksum = "a106dd90ab4071f9e16b9fd3c2057d61c37f35af7c8f079c9ec59d6ede5b2cef"
dependencies = [
"anyhow",
"cranelift-codegen",
@ -144,9 +158,9 @@ dependencies = [
[[package]]
name = "cranelift-native"
version = "0.87.0"
version = "0.88.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "885debe62f2078638d6585f54c9f05f5c2008f22ce5a2a9100ada785fc065dbd"
checksum = "c30ba8b910f1be023af0c39109cb28a8809734942a6b3eecbf2de8993052ea5e"
dependencies = [
"cranelift-codegen",
"libc",
@ -155,9 +169,9 @@ dependencies = [
[[package]]
name = "cranelift-object"
version = "0.87.0"
version = "0.88.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aac1310cf1081ae8eca916c92cd163b977c77cab6e831fa812273c26ff921816"
checksum = "506ac7a483c765a83795166ffe689f656afc0f4eb57fafa3f9e60b64bfa2caa6"
dependencies = [
"anyhow",
"cranelift-codegen",

View File

@ -8,12 +8,12 @@ crate-type = ["dylib"]
[dependencies]
# These have to be in sync with each other
cranelift-codegen = { version = "0.87.0", features = ["unwind", "all-arch"] }
cranelift-frontend = "0.87.0"
cranelift-module = "0.87.0"
cranelift-native = "0.87.0"
cranelift-jit = { version = "0.87.0", optional = true }
cranelift-object = "0.87.0"
cranelift-codegen = { version = "0.88.0", features = ["unwind", "all-arch"] }
cranelift-frontend = "0.88.0"
cranelift-module = "0.88.0"
cranelift-native = "0.88.0"
cranelift-jit = { version = "0.88.0", optional = true }
cranelift-object = "0.88.0"
target-lexicon = "0.12.0"
gimli = { version = "0.26.0", default-features = false, features = ["write"]}
object = { version = "0.29.0", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }

View File

@ -6,6 +6,8 @@
use rustc_middle::ty::layout::FnAbiOf;
use rustc_middle::ty::print::with_no_trimmed_paths;
use cranelift_codegen::ir::UserFuncName;
use crate::constant::ConstantCx;
use crate::debuginfo::FunctionDebugContext;
use crate::prelude::*;
@ -64,7 +66,7 @@ pub(crate) fn codegen_fn<'tcx>(
let mut func_ctx = FunctionBuilderContext::new();
let mut func = cached_func;
func.clear();
func.name = ExternalName::user(0, func_id.as_u32());
func.name = UserFuncName::user(0, func_id.as_u32());
func.signature = sig;
func.collect_debug_info();

View File

@ -96,8 +96,8 @@ mod prelude {
pub(crate) use cranelift_codegen::ir::function::Function;
pub(crate) use cranelift_codegen::ir::types;
pub(crate) use cranelift_codegen::ir::{
AbiParam, Block, ExternalName, FuncRef, Inst, InstBuilder, MemFlags, Signature, SourceLoc,
StackSlot, StackSlotData, StackSlotKind, TrapCode, Type, Value,
AbiParam, Block, FuncRef, Inst, InstBuilder, MemFlags, Signature, SourceLoc, StackSlot,
StackSlotData, StackSlotKind, TrapCode, Type, Value,
};
pub(crate) use cranelift_codegen::isa::{self, CallConv};
pub(crate) use cranelift_codegen::Context;