Skip to content

Commit a563e11

Browse files
committed
Update Cranelift to 0.93.0
Closes rust-lang#1352
1 parent 10c3c72 commit a563e11

File tree

6 files changed

+40
-298
lines changed

6 files changed

+40
-298
lines changed

Cargo.lock

Lines changed: 25 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@ crate-type = ["dylib"]
1515

1616
[dependencies]
1717
# These have to be in sync with each other
18-
cranelift-codegen = { version = "0.92", features = ["unwind", "all-arch"] }
19-
cranelift-frontend = { version = "0.92" }
20-
cranelift-module = { version = "0.92" }
21-
# NOTE vendored as src/cranelift_native.rs
22-
# FIXME revert back to the external crate with Cranelift 0.93
23-
#cranelift-native = { version = "0.92" }
24-
cranelift-jit = { version = "0.92", optional = true }
25-
cranelift-object = { version = "0.92" }
18+
cranelift-codegen = { version = "0.93", features = ["unwind", "all-arch"] }
19+
cranelift-frontend = { version = "0.93" }
20+
cranelift-module = { version = "0.93" }
21+
cranelift-native = { version = "0.93" }
22+
cranelift-jit = { version = "0.93", optional = true }
23+
cranelift-object = { version = "0.93" }
2624
target-lexicon = "0.12.0"
2725
gimli = { version = "0.26.0", default-features = false, features = ["write"]}
2826
object = { version = "0.29.0", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }

src/base.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -365,11 +365,10 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
365365
fx.bcx.set_cold_block(failure);
366366

367367
if *expected {
368-
fx.bcx.ins().brz(cond, failure, &[]);
368+
fx.bcx.ins().brif(cond, target, &[], failure, &[]);
369369
} else {
370-
fx.bcx.ins().brnz(cond, failure, &[]);
370+
fx.bcx.ins().brif(cond, failure, &[], target, &[]);
371371
};
372-
fx.bcx.ins().jump(target, &[]);
373372

374373
fx.bcx.switch_to_block(failure);
375374
fx.bcx.ins().nop();
@@ -425,11 +424,9 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
425424
}
426425
} else {
427426
if test_zero {
428-
fx.bcx.ins().brz(discr, then_block, &[]);
429-
fx.bcx.ins().jump(else_block, &[]);
427+
fx.bcx.ins().brif(discr, else_block, &[], then_block, &[]);
430428
} else {
431-
fx.bcx.ins().brnz(discr, then_block, &[]);
432-
fx.bcx.ins().jump(else_block, &[]);
429+
fx.bcx.ins().brif(discr, then_block, &[], else_block, &[]);
433430
}
434431
}
435432
} else {
@@ -751,8 +748,7 @@ fn codegen_stmt<'tcx>(
751748

752749
fx.bcx.switch_to_block(loop_block);
753750
let done = fx.bcx.ins().icmp_imm(IntCC::Equal, index, times as i64);
754-
fx.bcx.ins().brnz(done, done_block, &[]);
755-
fx.bcx.ins().jump(loop_block2, &[]);
751+
fx.bcx.ins().brif(done, done_block, &[], loop_block2, &[]);
756752

757753
fx.bcx.switch_to_block(loop_block2);
758754
let to = lval.place_index(fx, index);

0 commit comments

Comments
 (0)