Skip to content

Commit 598f090

Browse files
committed
Update to Cranelift 0.92
1 parent 6eef214 commit 598f090

File tree

3 files changed

+33
-47
lines changed

3 files changed

+33
-47
lines changed

Cargo.lock

+25-39
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ crate-type = ["dylib"]
1515

1616
[dependencies]
1717
# These have to be in sync with each other
18-
cranelift-codegen = { version = "0.91", features = ["unwind", "all-arch"] }
19-
cranelift-frontend = "0.91"
20-
cranelift-module = "0.91"
21-
cranelift-native = "0.91"
22-
cranelift-jit = { version = "0.91", optional = true }
23-
cranelift-object = "0.91"
18+
cranelift-codegen = { version = "0.92", features = ["unwind", "all-arch"] }
19+
cranelift-frontend = { version = "0.92" }
20+
cranelift-module = { version = "0.92" }
21+
cranelift-native = { version = "0.92" }
22+
cranelift-jit = { version = "0.92", optional = true }
23+
cranelift-object = { version = "0.92" }
2424
target-lexicon = "0.12.0"
2525
gimli = { version = "0.26.0", default-features = false, features = ["write"]}
2626
object = { version = "0.29.0", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }

src/optimize/peephole.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use cranelift_frontend::FunctionBuilder;
77
/// otherwise return the given value and false.
88
pub(crate) fn maybe_unwrap_bool_not(bcx: &mut FunctionBuilder<'_>, arg: Value) -> (Value, bool) {
99
if let ValueDef::Result(arg_inst, 0) = bcx.func.dfg.value_def(arg) {
10-
match bcx.func.dfg[arg_inst] {
10+
match bcx.func.dfg.insts[arg_inst] {
1111
// This is the lowering of `Rvalue::Not`
1212
InstructionData::IntCompareImm {
1313
opcode: Opcode::IcmpImm,
@@ -34,7 +34,7 @@ pub(crate) fn maybe_known_branch_taken(
3434
return None;
3535
};
3636

37-
match bcx.func.dfg[arg_inst] {
37+
match bcx.func.dfg.insts[arg_inst] {
3838
InstructionData::UnaryImm { opcode: Opcode::Iconst, imm } => {
3939
if test_zero {
4040
Some(imm.bits() == 0)

0 commit comments

Comments
 (0)