At debuginfo=0, don't inline debuginfo when inlining
This commit is contained in:
parent
c5de414865
commit
d05545c05d
@ -11,7 +11,7 @@
|
||||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::TypeVisitableExt;
|
||||
use rustc_middle::ty::{self, Instance, InstanceDef, ParamEnv, Ty, TyCtxt};
|
||||
use rustc_session::config::OptLevel;
|
||||
use rustc_session::config::{DebugInfo, OptLevel};
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::sym;
|
||||
use rustc_target::abi::FieldIdx;
|
||||
@ -699,7 +699,9 @@ fn dest_needs_borrow(place: Place<'_>) -> bool {
|
||||
// Insert all of the (mapped) parts of the callee body into the caller.
|
||||
caller_body.local_decls.extend(callee_body.drain_vars_and_temps());
|
||||
caller_body.source_scopes.extend(&mut callee_body.source_scopes.drain(..));
|
||||
caller_body.var_debug_info.append(&mut callee_body.var_debug_info);
|
||||
if self.tcx.sess.opts.debuginfo != DebugInfo::None {
|
||||
caller_body.var_debug_info.append(&mut callee_body.var_debug_info);
|
||||
}
|
||||
caller_body.basic_blocks_mut().extend(callee_body.basic_blocks_mut().drain(..));
|
||||
|
||||
caller_body[callsite.block].terminator = Some(Terminator {
|
||||
|
@ -34,18 +34,20 @@ pub fn replace_ref_str<'a>(r: &mut &'a str, v: &'a str) -> &'a str {
|
||||
|
||||
#[no_mangle]
|
||||
// CHECK-LABEL: @replace_short_array_3(
|
||||
// CHECK-SAME: ptr{{.+}}sret{{.+}}%[[RET:.+]], ptr{{.+}}%r, ptr{{.+}}%v
|
||||
pub fn replace_short_array_3(r: &mut [u32; 3], v: [u32; 3]) -> [u32; 3] {
|
||||
// CHECK-NOT: alloca
|
||||
// CHECK: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %result, ptr align 4 %r, i64 12, i1 false)
|
||||
// CHECK: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %[[RET]], ptr align 4 %r, i64 12, i1 false)
|
||||
// CHECK: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %r, ptr align 4 %v, i64 12, i1 false)
|
||||
std::mem::replace(r, v)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
// CHECK-LABEL: @replace_short_array_4(
|
||||
// CHECK-SAME: ptr{{.+}}sret{{.+}}%[[RET:.+]], ptr{{.+}}%r, ptr{{.+}}%v
|
||||
pub fn replace_short_array_4(r: &mut [u32; 4], v: [u32; 4]) -> [u32; 4] {
|
||||
// CHECK-NOT: alloca
|
||||
// CHECK: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %result, ptr align 4 %r, i64 16, i1 false)
|
||||
// CHECK: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %[[RET]], ptr align 4 %r, i64 16, i1 false)
|
||||
// CHECK: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %r, ptr align 4 %v, i64 16, i1 false)
|
||||
std::mem::replace(r, v)
|
||||
}
|
||||
|
@ -43,48 +43,48 @@
|
||||
// equality for non-byte types also just emit a `bcmp`, not a loop.
|
||||
|
||||
// CHECK-LABEL: @eq_slice_of_nested_u8(
|
||||
// CHECK-SAME: [[USIZE:i16|i32|i64]] noundef %1
|
||||
// CHECK-SAME: [[USIZE]] noundef %3
|
||||
// CHECK-SAME: [[USIZE:i16|i32|i64]] noundef %x.1
|
||||
// CHECK-SAME: [[USIZE]] noundef %y.1
|
||||
#[no_mangle]
|
||||
fn eq_slice_of_nested_u8(x: &[[u8; 3]], y: &[[u8; 3]]) -> bool {
|
||||
// CHECK: icmp eq [[USIZE]] %1, %3
|
||||
// CHECK: %[[BYTES:.+]] = mul nsw [[USIZE]] %1, 3
|
||||
// CHECK: icmp eq [[USIZE]] %x.1, %y.1
|
||||
// CHECK: %[[BYTES:.+]] = mul nsw [[USIZE]] {{%x.1|%y.1}}, 3
|
||||
// CHECK: tail call{{( noundef)?}} i32 @{{bcmp|memcmp}}(ptr
|
||||
// CHECK-SAME: , [[USIZE]]{{( noundef)?}} %[[BYTES]])
|
||||
x == y
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @eq_slice_of_i32(
|
||||
// CHECK-SAME: [[USIZE:i16|i32|i64]] noundef %1
|
||||
// CHECK-SAME: [[USIZE]] noundef %3
|
||||
// CHECK-SAME: [[USIZE:i16|i32|i64]] noundef %x.1
|
||||
// CHECK-SAME: [[USIZE]] noundef %y.1
|
||||
#[no_mangle]
|
||||
fn eq_slice_of_i32(x: &[i32], y: &[i32]) -> bool {
|
||||
// CHECK: icmp eq [[USIZE]] %1, %3
|
||||
// CHECK: %[[BYTES:.+]] = shl nsw [[USIZE]] %1, 2
|
||||
// CHECK: icmp eq [[USIZE]] %x.1, %y.1
|
||||
// CHECK: %[[BYTES:.+]] = shl nsw [[USIZE]] {{%x.1|%y.1}}, 2
|
||||
// CHECK: tail call{{( noundef)?}} i32 @{{bcmp|memcmp}}(ptr
|
||||
// CHECK-SAME: , [[USIZE]]{{( noundef)?}} %[[BYTES]])
|
||||
x == y
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @eq_slice_of_nonzero(
|
||||
// CHECK-SAME: [[USIZE:i16|i32|i64]] noundef %1
|
||||
// CHECK-SAME: [[USIZE]] noundef %3
|
||||
// CHECK-SAME: [[USIZE:i16|i32|i64]] noundef %x.1
|
||||
// CHECK-SAME: [[USIZE]] noundef %y.1
|
||||
#[no_mangle]
|
||||
fn eq_slice_of_nonzero(x: &[NonZero<i32>], y: &[NonZero<i32>]) -> bool {
|
||||
// CHECK: icmp eq [[USIZE]] %1, %3
|
||||
// CHECK: %[[BYTES:.+]] = shl nsw [[USIZE]] %1, 2
|
||||
// CHECK: icmp eq [[USIZE]] %x.1, %y.1
|
||||
// CHECK: %[[BYTES:.+]] = shl nsw [[USIZE]] {{%x.1|%y.1}}, 2
|
||||
// CHECK: tail call{{( noundef)?}} i32 @{{bcmp|memcmp}}(ptr
|
||||
// CHECK-SAME: , [[USIZE]]{{( noundef)?}} %[[BYTES]])
|
||||
x == y
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @eq_slice_of_option_of_nonzero(
|
||||
// CHECK-SAME: [[USIZE:i16|i32|i64]] noundef %1
|
||||
// CHECK-SAME: [[USIZE]] noundef %3
|
||||
// CHECK-SAME: [[USIZE:i16|i32|i64]] noundef %x.1
|
||||
// CHECK-SAME: [[USIZE]] noundef %y.1
|
||||
#[no_mangle]
|
||||
fn eq_slice_of_option_of_nonzero(x: &[Option<NonZero<i16>>], y: &[Option<NonZero<i16>>]) -> bool {
|
||||
// CHECK: icmp eq [[USIZE]] %1, %3
|
||||
// CHECK: %[[BYTES:.+]] = shl nsw [[USIZE]] %1, 1
|
||||
// CHECK: icmp eq [[USIZE]] %x.1, %y.1
|
||||
// CHECK: %[[BYTES:.+]] = shl nsw [[USIZE]] {{%x.1|%y.1}}, 1
|
||||
// CHECK: tail call{{( noundef)?}} i32 @{{bcmp|memcmp}}(ptr
|
||||
// CHECK-SAME: , [[USIZE]]{{( noundef)?}} %[[BYTES]])
|
||||
x == y
|
||||
|
@ -9,8 +9,6 @@
|
||||
scope 1 {
|
||||
}
|
||||
scope 2 (inlined #[track_caller] <u8 as Add>::add) {
|
||||
debug self => _2;
|
||||
debug other => _3;
|
||||
let mut _4: (u8, bool);
|
||||
}
|
||||
|
||||
|
@ -9,8 +9,6 @@
|
||||
scope 1 {
|
||||
}
|
||||
scope 2 (inlined #[track_caller] <u8 as Add>::add) {
|
||||
debug self => _2;
|
||||
debug other => _3;
|
||||
let mut _4: (u8, bool);
|
||||
}
|
||||
|
||||
|
@ -12,16 +12,13 @@
|
||||
let _3: std::ptr::Unique<[bool]>;
|
||||
let mut _4: std::ptr::Unique<[bool; 0]>;
|
||||
scope 3 {
|
||||
debug ptr => _3;
|
||||
}
|
||||
scope 4 (inlined Unique::<[bool; 0]>::dangling) {
|
||||
let mut _5: std::ptr::NonNull<[bool; 0]>;
|
||||
scope 5 (inlined NonNull::<[bool; 0]>::dangling) {
|
||||
let _6: *mut [bool; 0];
|
||||
scope 6 {
|
||||
debug ptr => _6;
|
||||
scope 10 (inlined NonNull::<[bool; 0]>::new_unchecked) {
|
||||
debug ptr => _6;
|
||||
let mut _8: bool;
|
||||
let _9: ();
|
||||
let mut _10: *mut ();
|
||||
@ -37,7 +34,6 @@
|
||||
scope 8 (inlined align_of::<[bool; 0]>) {
|
||||
}
|
||||
scope 9 (inlined without_provenance_mut::<[bool; 0]>) {
|
||||
debug addr => _7;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,16 +12,13 @@
|
||||
let _3: std::ptr::Unique<[bool]>;
|
||||
let mut _4: std::ptr::Unique<[bool; 0]>;
|
||||
scope 3 {
|
||||
debug ptr => _3;
|
||||
}
|
||||
scope 4 (inlined Unique::<[bool; 0]>::dangling) {
|
||||
let mut _5: std::ptr::NonNull<[bool; 0]>;
|
||||
scope 5 (inlined NonNull::<[bool; 0]>::dangling) {
|
||||
let _6: *mut [bool; 0];
|
||||
scope 6 {
|
||||
debug ptr => _6;
|
||||
scope 10 (inlined NonNull::<[bool; 0]>::new_unchecked) {
|
||||
debug ptr => _6;
|
||||
let mut _8: bool;
|
||||
let _9: ();
|
||||
let mut _10: *mut ();
|
||||
@ -37,7 +34,6 @@
|
||||
scope 8 (inlined align_of::<[bool; 0]>) {
|
||||
}
|
||||
scope 9 (inlined without_provenance_mut::<[bool; 0]>) {
|
||||
debug addr => _7;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,16 +12,13 @@
|
||||
let _3: std::ptr::Unique<[bool]>;
|
||||
let mut _4: std::ptr::Unique<[bool; 0]>;
|
||||
scope 3 {
|
||||
debug ptr => _3;
|
||||
}
|
||||
scope 4 (inlined Unique::<[bool; 0]>::dangling) {
|
||||
let mut _5: std::ptr::NonNull<[bool; 0]>;
|
||||
scope 5 (inlined NonNull::<[bool; 0]>::dangling) {
|
||||
let _6: *mut [bool; 0];
|
||||
scope 6 {
|
||||
debug ptr => _6;
|
||||
scope 10 (inlined NonNull::<[bool; 0]>::new_unchecked) {
|
||||
debug ptr => _6;
|
||||
let mut _8: bool;
|
||||
let _9: ();
|
||||
let mut _10: *mut ();
|
||||
@ -37,7 +34,6 @@
|
||||
scope 8 (inlined align_of::<[bool; 0]>) {
|
||||
}
|
||||
scope 9 (inlined without_provenance_mut::<[bool; 0]>) {
|
||||
debug addr => _7;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,16 +12,13 @@
|
||||
let _3: std::ptr::Unique<[bool]>;
|
||||
let mut _4: std::ptr::Unique<[bool; 0]>;
|
||||
scope 3 {
|
||||
debug ptr => _3;
|
||||
}
|
||||
scope 4 (inlined Unique::<[bool; 0]>::dangling) {
|
||||
let mut _5: std::ptr::NonNull<[bool; 0]>;
|
||||
scope 5 (inlined NonNull::<[bool; 0]>::dangling) {
|
||||
let _6: *mut [bool; 0];
|
||||
scope 6 {
|
||||
debug ptr => _6;
|
||||
scope 10 (inlined NonNull::<[bool; 0]>::new_unchecked) {
|
||||
debug ptr => _6;
|
||||
let mut _8: bool;
|
||||
let _9: ();
|
||||
let mut _10: *mut ();
|
||||
@ -37,7 +34,6 @@
|
||||
scope 8 (inlined align_of::<[bool; 0]>) {
|
||||
}
|
||||
scope 9 (inlined without_provenance_mut::<[bool; 0]>) {
|
||||
debug addr => _7;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,16 +12,13 @@
|
||||
let _3: std::ptr::Unique<[bool]>;
|
||||
let mut _4: std::ptr::Unique<[bool; 0]>;
|
||||
scope 3 {
|
||||
debug ptr => _3;
|
||||
}
|
||||
scope 4 (inlined Unique::<[bool; 0]>::dangling) {
|
||||
let mut _5: std::ptr::NonNull<[bool; 0]>;
|
||||
scope 5 (inlined NonNull::<[bool; 0]>::dangling) {
|
||||
let _6: *mut [bool; 0];
|
||||
scope 6 {
|
||||
debug ptr => _6;
|
||||
scope 10 (inlined NonNull::<[bool; 0]>::new_unchecked) {
|
||||
debug ptr => _6;
|
||||
let mut _8: bool;
|
||||
let _9: ();
|
||||
let mut _10: *mut ();
|
||||
@ -37,7 +34,6 @@
|
||||
scope 8 (inlined align_of::<[bool; 0]>) {
|
||||
}
|
||||
scope 9 (inlined without_provenance_mut::<[bool; 0]>) {
|
||||
debug addr => _7;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,16 +12,13 @@
|
||||
let _3: std::ptr::Unique<[bool]>;
|
||||
let mut _4: std::ptr::Unique<[bool; 0]>;
|
||||
scope 3 {
|
||||
debug ptr => _3;
|
||||
}
|
||||
scope 4 (inlined Unique::<[bool; 0]>::dangling) {
|
||||
let mut _5: std::ptr::NonNull<[bool; 0]>;
|
||||
scope 5 (inlined NonNull::<[bool; 0]>::dangling) {
|
||||
let _6: *mut [bool; 0];
|
||||
scope 6 {
|
||||
debug ptr => _6;
|
||||
scope 10 (inlined NonNull::<[bool; 0]>::new_unchecked) {
|
||||
debug ptr => _6;
|
||||
let mut _8: bool;
|
||||
let _9: ();
|
||||
let mut _10: *mut ();
|
||||
@ -37,7 +34,6 @@
|
||||
scope 8 (inlined align_of::<[bool; 0]>) {
|
||||
}
|
||||
scope 9 (inlined without_provenance_mut::<[bool; 0]>) {
|
||||
debug addr => _7;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,16 +12,13 @@
|
||||
let _3: std::ptr::Unique<[bool]>;
|
||||
let mut _4: std::ptr::Unique<[bool; 0]>;
|
||||
scope 3 {
|
||||
debug ptr => _3;
|
||||
}
|
||||
scope 4 (inlined Unique::<[bool; 0]>::dangling) {
|
||||
let mut _5: std::ptr::NonNull<[bool; 0]>;
|
||||
scope 5 (inlined NonNull::<[bool; 0]>::dangling) {
|
||||
let _6: *mut [bool; 0];
|
||||
scope 6 {
|
||||
debug ptr => _6;
|
||||
scope 10 (inlined NonNull::<[bool; 0]>::new_unchecked) {
|
||||
debug ptr => _6;
|
||||
let mut _8: bool;
|
||||
let _9: ();
|
||||
let mut _10: *mut ();
|
||||
@ -37,7 +34,6 @@
|
||||
scope 8 (inlined align_of::<[bool; 0]>) {
|
||||
}
|
||||
scope 9 (inlined without_provenance_mut::<[bool; 0]>) {
|
||||
debug addr => _7;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,16 +12,13 @@
|
||||
let _3: std::ptr::Unique<[bool]>;
|
||||
let mut _4: std::ptr::Unique<[bool; 0]>;
|
||||
scope 3 {
|
||||
debug ptr => _3;
|
||||
}
|
||||
scope 4 (inlined Unique::<[bool; 0]>::dangling) {
|
||||
let mut _5: std::ptr::NonNull<[bool; 0]>;
|
||||
scope 5 (inlined NonNull::<[bool; 0]>::dangling) {
|
||||
let _6: *mut [bool; 0];
|
||||
scope 6 {
|
||||
debug ptr => _6;
|
||||
scope 10 (inlined NonNull::<[bool; 0]>::new_unchecked) {
|
||||
debug ptr => _6;
|
||||
let mut _8: bool;
|
||||
let _9: ();
|
||||
let mut _10: *mut ();
|
||||
@ -37,7 +34,6 @@
|
||||
scope 8 (inlined align_of::<[bool; 0]>) {
|
||||
}
|
||||
scope 9 (inlined without_provenance_mut::<[bool; 0]>) {
|
||||
debug addr => _7;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,8 +9,6 @@
|
||||
scope 1 {
|
||||
}
|
||||
scope 2 (inlined #[track_caller] <u8 as Add>::add) {
|
||||
debug self => _2;
|
||||
debug other => _3;
|
||||
let mut _4: (u8, bool);
|
||||
}
|
||||
|
||||
|
@ -9,8 +9,6 @@
|
||||
scope 1 {
|
||||
}
|
||||
scope 2 (inlined #[track_caller] <u8 as Add>::add) {
|
||||
debug self => _2;
|
||||
debug other => _3;
|
||||
let mut _4: (u8, bool);
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// skip-filecheck
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
//! Tests that we can propagate into places that are projections into unions
|
||||
//@ compile-flags: -Zunsound-mir-opts
|
||||
//@ compile-flags: -Zunsound-mir-opts -C debuginfo=full
|
||||
fn val() -> u32 {
|
||||
1
|
||||
}
|
||||
|
@ -29,13 +29,11 @@
|
||||
debug precision => _8;
|
||||
let _8: usize;
|
||||
scope 5 (inlined Formatter::<'_>::precision) {
|
||||
debug self => _1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
scope 4 (inlined Formatter::<'_>::sign_plus) {
|
||||
debug self => _1;
|
||||
let mut _20: u32;
|
||||
let mut _21: u32;
|
||||
}
|
||||
|
@ -29,13 +29,11 @@
|
||||
debug precision => _8;
|
||||
let _8: usize;
|
||||
scope 5 (inlined Formatter::<'_>::precision) {
|
||||
debug self => _1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
scope 4 (inlined Formatter::<'_>::sign_plus) {
|
||||
debug self => _1;
|
||||
let mut _20: u32;
|
||||
let mut _21: u32;
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
//@ needs-asm-support
|
||||
//@ needs-unwind
|
||||
//@ compile-flags: -Zinline-mir-hint-threshold=1000
|
||||
//@ compile-flags: -Zinline-mir-hint-threshold=1000 -C debuginfo=full
|
||||
#![feature(asm_unwind)]
|
||||
|
||||
struct D;
|
||||
|
@ -1,5 +1,5 @@
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
//@ compile-flags: -Zinline-mir-hint-threshold=1000
|
||||
//@ compile-flags: -Zinline-mir-hint-threshold=1000 -C debuginfo=full
|
||||
|
||||
// EMIT_MIR cycle.f.Inline.diff
|
||||
#[inline(always)]
|
||||
|
@ -1,4 +1,5 @@
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
//@ compile-flags: -C debuginfo=full
|
||||
#![crate_type = "lib"]
|
||||
|
||||
use std::fmt::Debug;
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ compile-flags: -Z span_free_formats
|
||||
//@ compile-flags: -Z span_free_formats -C debuginfo=full
|
||||
|
||||
// Tests that MIR inliner works for any operand
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ compile-flags: -Z span_free_formats
|
||||
//@ compile-flags: -Z span_free_formats -C debuginfo=full
|
||||
|
||||
// Tests that MIR inliner can handle closure arguments. (#45894)
|
||||
|
||||
|
@ -14,10 +14,7 @@ fn foo(_1: T, _2: &i32) -> i32 {
|
||||
scope 1 {
|
||||
debug x => _3;
|
||||
scope 2 (inlined foo::<T>::{closure#0}) {
|
||||
debug r => _8;
|
||||
debug _s => _9;
|
||||
scope 3 {
|
||||
debug variable => _8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,9 +14,6 @@ fn foo(_1: T, _2: i32) -> (i32, T) {
|
||||
scope 1 {
|
||||
debug x => _3;
|
||||
scope 2 (inlined foo::<T>::{closure#0}) {
|
||||
debug _q => _9;
|
||||
debug q => (*((*_6).0: &i32));
|
||||
debug t => (*((*_6).1: &T));
|
||||
let mut _10: &i32;
|
||||
let mut _11: i32;
|
||||
let mut _12: &T;
|
||||
|
@ -16,7 +16,6 @@
|
||||
+ scope 3 (inlined Pin::<&mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8}>::new) {
|
||||
+ debug pointer => _3;
|
||||
+ scope 4 (inlined Pin::<&mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8}>::new_unchecked) {
|
||||
+ debug pointer => _3;
|
||||
+ }
|
||||
+ }
|
||||
+ scope 5 (inlined g::{closure#0}) {
|
||||
|
@ -16,7 +16,6 @@
|
||||
+ scope 3 (inlined Pin::<&mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8}>::new) {
|
||||
+ debug pointer => _3;
|
||||
+ scope 4 (inlined Pin::<&mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8}>::new_unchecked) {
|
||||
+ debug pointer => _3;
|
||||
+ }
|
||||
+ }
|
||||
+ scope 5 (inlined g::{closure#0}) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
//@ compile-flags: -Zinline-mir-hint-threshold=1000
|
||||
//@ compile-flags: -Zinline-mir-hint-threshold=1000 -C debuginfo=full
|
||||
#![feature(coroutines, coroutine_trait)]
|
||||
|
||||
use std::ops::Coroutine;
|
||||
|
@ -1,4 +1,5 @@
|
||||
// skip-filecheck
|
||||
//@ compile-flags: -C debuginfo=full
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
// Check that inliner handles various forms of recursion and doesn't fall into
|
||||
// an infinite inlining cycle. The particular outcome of inlining is not
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Tests inlining of diverging calls.
|
||||
//
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
//@ compile-flags: -Zinline-mir-hint-threshold=1000
|
||||
//@ compile-flags: -Zinline-mir-hint-threshold=1000 -C debuginfo=full
|
||||
#![crate_type = "lib"]
|
||||
|
||||
// EMIT_MIR inline_diverging.f.Inline.diff
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ compile-flags: -Z span_free_formats -Z mir-emit-retag
|
||||
//@ compile-flags: -Z span_free_formats -Z mir-emit-retag -C debuginfo=full
|
||||
|
||||
// Tests that MIR inliner fixes up `Retag`'s `fn_entry` flag
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
//@ compile-flags: -Z span_free_formats -Z mir-opt-level=4
|
||||
//@ compile-flags: -Z span_free_formats -Z mir-opt-level=4 -C debuginfo=full
|
||||
|
||||
// EMIT_MIR inline_trait_method_2.test2.Inline.after.mir
|
||||
fn test2(x: &dyn X) -> bool {
|
||||
|
@ -1,3 +1,4 @@
|
||||
//@ compile-flags: -C debuginfo=full
|
||||
// Verify that we do not ICE inlining a function which uses _0 as an index.
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
//@ compile-flags: -C debuginfo=full
|
||||
|
||||
// EMIT_MIR issue_58867_inline_as_ref_as_mut.a.Inline.after.mir
|
||||
pub fn a<T>(x: &mut [T]) -> &mut [T] {
|
||||
// CHECK-LABEL: fn a(
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: ();
|
||||
let _1: {closure@$DIR/issue_76997_inline_scopes_parenting.rs:15:13: 15:16};
|
||||
let mut _2: &{closure@$DIR/issue_76997_inline_scopes_parenting.rs:15:13: 15:16};
|
||||
let _1: {closure@$DIR/issue_76997_inline_scopes_parenting.rs:16:13: 16:16};
|
||||
let mut _2: &{closure@$DIR/issue_76997_inline_scopes_parenting.rs:16:13: 16:16};
|
||||
let mut _3: ((),);
|
||||
let mut _4: ();
|
||||
let mut _5: ();
|
||||
@ -19,7 +19,7 @@ fn main() -> () {
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1);
|
||||
_1 = {closure@$DIR/issue_76997_inline_scopes_parenting.rs:15:13: 15:16};
|
||||
_1 = {closure@$DIR/issue_76997_inline_scopes_parenting.rs:16:13: 16:16};
|
||||
StorageLive(_2);
|
||||
_2 = &_1;
|
||||
StorageLive(_3);
|
||||
|
@ -1,3 +1,4 @@
|
||||
//@ compile-flags: -C debuginfo=full
|
||||
// Tests that MIR inliner can handle `SourceScopeData` parenting correctly. (#76997)
|
||||
|
||||
// EMIT_MIR issue_76997_inline_scopes_parenting.main.Inline.after.mir
|
||||
|
@ -1,4 +1,4 @@
|
||||
//@ compile-flags: -Z mir-opt-level=3 -Z inline-mir
|
||||
//@ compile-flags: -Z mir-opt-level=3 -Z inline-mir -C debuginfo=full
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -8,8 +8,6 @@
|
||||
let mut _3: u16;
|
||||
let mut _4: u32;
|
||||
+ scope 1 (inlined core::num::<impl u16>::unchecked_shl) {
|
||||
+ debug self => _3;
|
||||
+ debug rhs => _4;
|
||||
+ }
|
||||
|
||||
bb0: {
|
||||
|
@ -8,8 +8,6 @@
|
||||
let mut _3: u16;
|
||||
let mut _4: u32;
|
||||
+ scope 1 (inlined core::num::<impl u16>::unchecked_shl) {
|
||||
+ debug self => _3;
|
||||
+ debug rhs => _4;
|
||||
+ }
|
||||
|
||||
bb0: {
|
||||
|
@ -5,8 +5,6 @@ fn unchecked_shl_unsigned_smaller(_1: u16, _2: u32) -> u16 {
|
||||
debug b => _2;
|
||||
let mut _0: u16;
|
||||
scope 1 (inlined core::num::<impl u16>::unchecked_shl) {
|
||||
debug self => _1;
|
||||
debug rhs => _2;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
|
@ -5,8 +5,6 @@ fn unchecked_shl_unsigned_smaller(_1: u16, _2: u32) -> u16 {
|
||||
debug b => _2;
|
||||
let mut _0: u16;
|
||||
scope 1 (inlined core::num::<impl u16>::unchecked_shl) {
|
||||
debug self => _1;
|
||||
debug rhs => _2;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
|
@ -8,8 +8,6 @@
|
||||
let mut _3: i64;
|
||||
let mut _4: u32;
|
||||
+ scope 1 (inlined core::num::<impl i64>::unchecked_shr) {
|
||||
+ debug self => _3;
|
||||
+ debug rhs => _4;
|
||||
+ }
|
||||
|
||||
bb0: {
|
||||
|
@ -8,8 +8,6 @@
|
||||
let mut _3: i64;
|
||||
let mut _4: u32;
|
||||
+ scope 1 (inlined core::num::<impl i64>::unchecked_shr) {
|
||||
+ debug self => _3;
|
||||
+ debug rhs => _4;
|
||||
+ }
|
||||
|
||||
bb0: {
|
||||
|
@ -5,8 +5,6 @@ fn unchecked_shr_signed_bigger(_1: i64, _2: u32) -> i64 {
|
||||
debug b => _2;
|
||||
let mut _0: i64;
|
||||
scope 1 (inlined core::num::<impl i64>::unchecked_shr) {
|
||||
debug self => _1;
|
||||
debug rhs => _2;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
|
@ -5,8 +5,6 @@ fn unchecked_shr_signed_bigger(_1: i64, _2: u32) -> i64 {
|
||||
debug b => _2;
|
||||
let mut _0: i64;
|
||||
scope 1 (inlined core::num::<impl i64>::unchecked_shr) {
|
||||
debug self => _1;
|
||||
debug rhs => _2;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
|
@ -6,10 +6,8 @@
|
||||
let mut _0: T;
|
||||
let mut _2: std::option::Option<T>;
|
||||
+ scope 1 (inlined #[track_caller] Option::<T>::unwrap_unchecked) {
|
||||
+ debug self => _2;
|
||||
+ let mut _3: isize;
|
||||
+ scope 2 {
|
||||
+ debug val => _0;
|
||||
+ }
|
||||
+ scope 3 (inlined unreachable_unchecked) {
|
||||
+ let mut _4: bool;
|
||||
|
@ -6,10 +6,8 @@
|
||||
let mut _0: T;
|
||||
let mut _2: std::option::Option<T>;
|
||||
+ scope 1 (inlined #[track_caller] Option::<T>::unwrap_unchecked) {
|
||||
+ debug self => _2;
|
||||
+ let mut _3: isize;
|
||||
+ scope 2 {
|
||||
+ debug val => _0;
|
||||
+ }
|
||||
+ scope 3 (inlined unreachable_unchecked) {
|
||||
+ let mut _4: bool;
|
||||
|
@ -4,10 +4,8 @@ fn unwrap_unchecked(_1: Option<T>) -> T {
|
||||
debug slf => _1;
|
||||
let mut _0: T;
|
||||
scope 1 (inlined #[track_caller] Option::<T>::unwrap_unchecked) {
|
||||
debug self => _1;
|
||||
let mut _2: isize;
|
||||
scope 2 {
|
||||
debug val => _0;
|
||||
}
|
||||
scope 3 (inlined unreachable_unchecked) {
|
||||
scope 4 (inlined core::ub_checks::check_language_ub) {
|
||||
|
@ -4,10 +4,8 @@ fn unwrap_unchecked(_1: Option<T>) -> T {
|
||||
debug slf => _1;
|
||||
let mut _0: T;
|
||||
scope 1 (inlined #[track_caller] Option::<T>::unwrap_unchecked) {
|
||||
debug self => _1;
|
||||
let mut _2: isize;
|
||||
scope 2 {
|
||||
debug val => _0;
|
||||
}
|
||||
scope 3 (inlined unreachable_unchecked) {
|
||||
scope 4 (inlined core::ub_checks::check_language_ub) {
|
||||
|
@ -21,8 +21,6 @@
|
||||
scope 3 {
|
||||
}
|
||||
+ scope 6 (inlined ActionPermit::<'_, T>::perform::{closure#0}) {
|
||||
+ debug _task_context => _31;
|
||||
+ debug self => ((*(_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()})).0: ActionPermit<'_, T>);
|
||||
+ let _11: ActionPermit<'_, T>;
|
||||
+ let mut _12: std::future::Ready<()>;
|
||||
+ let mut _13: std::future::Ready<()>;
|
||||
@ -52,28 +50,22 @@
|
||||
+ let mut _39: &mut {async fn body of ActionPermit<'_, T>::perform()};
|
||||
+ let mut _40: &mut {async fn body of ActionPermit<'_, T>::perform()};
|
||||
+ scope 7 {
|
||||
+ debug self => (((*(_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()})) as variant#3).0: ActionPermit<'_, T>);
|
||||
+ let mut _15: std::future::Ready<()>;
|
||||
+ scope 8 {
|
||||
+ debug __awaitee => (((*(_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()})) as variant#3).1: std::future::Ready<()>);
|
||||
+ let _26: ();
|
||||
+ scope 9 {
|
||||
+ debug result => _26;
|
||||
+ }
|
||||
+ }
|
||||
+ scope 10 (inlined ready::<()>) {
|
||||
+ debug t => _14;
|
||||
+ let mut _41: std::option::Option<()>;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
+ scope 5 (inlined Pin::<&mut {async fn body of ActionPermit<'_, T>::perform()}>::new_unchecked) {
|
||||
+ debug pointer => _5;
|
||||
+ }
|
||||
}
|
||||
+ scope 4 (inlined ActionPermit::<'_, T>::perform) {
|
||||
+ debug self => _3;
|
||||
+ }
|
||||
|
||||
bb0: {
|
||||
|
@ -21,8 +21,6 @@
|
||||
scope 3 {
|
||||
}
|
||||
+ scope 6 (inlined ActionPermit::<'_, T>::perform::{closure#0}) {
|
||||
+ debug _task_context => _31;
|
||||
+ debug self => ((*(_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()})).0: ActionPermit<'_, T>);
|
||||
+ let _11: ActionPermit<'_, T>;
|
||||
+ let mut _12: std::future::Ready<()>;
|
||||
+ let mut _13: std::future::Ready<()>;
|
||||
@ -54,28 +52,22 @@
|
||||
+ let mut _41: &mut {async fn body of ActionPermit<'_, T>::perform()};
|
||||
+ let mut _42: &mut {async fn body of ActionPermit<'_, T>::perform()};
|
||||
+ scope 7 {
|
||||
+ debug self => (((*(_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()})) as variant#3).0: ActionPermit<'_, T>);
|
||||
+ let mut _15: std::future::Ready<()>;
|
||||
+ scope 8 {
|
||||
+ debug __awaitee => (((*(_8.0: &mut {async fn body of ActionPermit<'_, T>::perform()})) as variant#3).1: std::future::Ready<()>);
|
||||
+ let _26: ();
|
||||
+ scope 9 {
|
||||
+ debug result => _26;
|
||||
+ }
|
||||
+ }
|
||||
+ scope 10 (inlined ready::<()>) {
|
||||
+ debug t => _14;
|
||||
+ let mut _43: std::option::Option<()>;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
+ scope 5 (inlined Pin::<&mut {async fn body of ActionPermit<'_, T>::perform()}>::new_unchecked) {
|
||||
+ debug pointer => _5;
|
||||
+ }
|
||||
}
|
||||
+ scope 4 (inlined ActionPermit::<'_, T>::perform) {
|
||||
+ debug self => _3;
|
||||
+ }
|
||||
|
||||
bb0: {
|
||||
|
@ -6,7 +6,6 @@
|
||||
let mut _0: i32;
|
||||
let mut _2: &T;
|
||||
+ scope 1 (inlined <T as Foo>::bar) {
|
||||
+ debug self => _2;
|
||||
+ }
|
||||
|
||||
bb0: {
|
||||
|
@ -8,7 +8,6 @@
|
||||
let mut _3: *const &u8;
|
||||
let mut _4: *const &u8;
|
||||
scope 1 (inlined generic_cast::<&u8, &u8>) {
|
||||
debug x => _4;
|
||||
let mut _5: *const &u8;
|
||||
}
|
||||
|
||||
|
@ -6,10 +6,8 @@
|
||||
let mut _0: i32;
|
||||
let mut _2: std::option::Option<i32>;
|
||||
scope 1 (inlined #[track_caller] Option::<i32>::unwrap_unchecked) {
|
||||
debug self => _2;
|
||||
let mut _3: isize;
|
||||
scope 2 {
|
||||
debug val => _0;
|
||||
}
|
||||
scope 3 (inlined unreachable_unchecked) {
|
||||
let mut _4: bool;
|
||||
|
@ -17,15 +17,11 @@
|
||||
let mut _12: u32;
|
||||
let mut _13: bool;
|
||||
scope 1 (inlined imm8) {
|
||||
debug x => _5;
|
||||
let mut _14: u32;
|
||||
scope 2 {
|
||||
debug out => _4;
|
||||
}
|
||||
}
|
||||
scope 3 (inlined core::num::<impl u32>::rotate_right) {
|
||||
debug self => _4;
|
||||
debug n => _6;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
@ -34,7 +30,7 @@
|
||||
StorageLive(_4);
|
||||
StorageLive(_5);
|
||||
_5 = _1;
|
||||
_4 = const 0_u32;
|
||||
nop;
|
||||
- StorageLive(_14);
|
||||
- _14 = BitAnd(_5, const 255_u32);
|
||||
- _4 = BitOr(const 0_u32, move _14);
|
||||
@ -74,7 +70,8 @@
|
||||
bb2: {
|
||||
_6 = Shl(move _7, const 1_i32);
|
||||
StorageDead(_7);
|
||||
_3 = rotate_right::<u32>(move _4, move _6) -> [return: bb3, unwind unreachable];
|
||||
- _3 = rotate_right::<u32>(move _4, move _6) -> [return: bb3, unwind unreachable];
|
||||
+ _3 = rotate_right::<u32>(_14, move _6) -> [return: bb3, unwind unreachable];
|
||||
}
|
||||
|
||||
bb3: {
|
||||
|
@ -17,15 +17,11 @@
|
||||
let mut _12: u32;
|
||||
let mut _13: bool;
|
||||
scope 1 (inlined imm8) {
|
||||
debug x => _5;
|
||||
let mut _14: u32;
|
||||
scope 2 {
|
||||
debug out => _4;
|
||||
}
|
||||
}
|
||||
scope 3 (inlined core::num::<impl u32>::rotate_right) {
|
||||
debug self => _4;
|
||||
debug n => _6;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
@ -34,7 +30,7 @@
|
||||
StorageLive(_4);
|
||||
StorageLive(_5);
|
||||
_5 = _1;
|
||||
_4 = const 0_u32;
|
||||
nop;
|
||||
- StorageLive(_14);
|
||||
- _14 = BitAnd(_5, const 255_u32);
|
||||
- _4 = BitOr(const 0_u32, move _14);
|
||||
@ -74,7 +70,8 @@
|
||||
bb2: {
|
||||
_6 = Shl(move _7, const 1_i32);
|
||||
StorageDead(_7);
|
||||
_3 = rotate_right::<u32>(move _4, move _6) -> [return: bb3, unwind unreachable];
|
||||
- _3 = rotate_right::<u32>(move _4, move _6) -> [return: bb3, unwind unreachable];
|
||||
+ _3 = rotate_right::<u32>(_14, move _6) -> [return: bb3, unwind unreachable];
|
||||
}
|
||||
|
||||
bb3: {
|
||||
|
@ -3,66 +3,56 @@
|
||||
fn num_to_digit(_1: char) -> u32 {
|
||||
debug num => _1;
|
||||
let mut _0: u32;
|
||||
let mut _5: std::option::Option<u32>;
|
||||
let mut _4: std::option::Option<u32>;
|
||||
scope 1 (inlined char::methods::<impl char>::is_digit) {
|
||||
debug self => _1;
|
||||
debug radix => const 8_u32;
|
||||
let _2: std::option::Option<u32>;
|
||||
let mut _3: &std::option::Option<u32>;
|
||||
scope 2 (inlined Option::<u32>::is_some) {
|
||||
debug self => _3;
|
||||
let mut _4: isize;
|
||||
let mut _3: isize;
|
||||
}
|
||||
}
|
||||
scope 3 (inlined #[track_caller] Option::<u32>::unwrap) {
|
||||
debug self => _5;
|
||||
let mut _6: isize;
|
||||
let mut _7: !;
|
||||
let mut _5: isize;
|
||||
let mut _6: !;
|
||||
scope 4 {
|
||||
debug val => _0;
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_3);
|
||||
StorageLive(_2);
|
||||
_2 = char::methods::<impl char>::to_digit(_1, const 8_u32) -> [return: bb1, unwind unreachable];
|
||||
}
|
||||
|
||||
bb1: {
|
||||
_3 = &_2;
|
||||
StorageLive(_4);
|
||||
_4 = discriminant(_2);
|
||||
switchInt(move _4) -> [1: bb2, 0: bb6, otherwise: bb8];
|
||||
StorageLive(_3);
|
||||
_3 = discriminant(_2);
|
||||
switchInt(move _3) -> [1: bb2, 0: bb6, otherwise: bb8];
|
||||
}
|
||||
|
||||
bb2: {
|
||||
StorageDead(_4);
|
||||
StorageDead(_3);
|
||||
StorageDead(_2);
|
||||
StorageLive(_5);
|
||||
_5 = char::methods::<impl char>::to_digit(move _1, const 8_u32) -> [return: bb3, unwind unreachable];
|
||||
StorageLive(_4);
|
||||
_4 = char::methods::<impl char>::to_digit(move _1, const 8_u32) -> [return: bb3, unwind unreachable];
|
||||
}
|
||||
|
||||
bb3: {
|
||||
StorageLive(_6);
|
||||
_6 = discriminant(_5);
|
||||
switchInt(move _6) -> [0: bb4, 1: bb5, otherwise: bb8];
|
||||
StorageLive(_5);
|
||||
_5 = discriminant(_4);
|
||||
switchInt(move _5) -> [0: bb4, 1: bb5, otherwise: bb8];
|
||||
}
|
||||
|
||||
bb4: {
|
||||
_7 = option::unwrap_failed() -> unwind unreachable;
|
||||
_6 = option::unwrap_failed() -> unwind unreachable;
|
||||
}
|
||||
|
||||
bb5: {
|
||||
_0 = move ((_5 as Some).0: u32);
|
||||
StorageDead(_6);
|
||||
_0 = move ((_4 as Some).0: u32);
|
||||
StorageDead(_5);
|
||||
StorageDead(_4);
|
||||
goto -> bb7;
|
||||
}
|
||||
|
||||
bb6: {
|
||||
StorageDead(_4);
|
||||
StorageDead(_3);
|
||||
StorageDead(_2);
|
||||
_0 = const 0_u32;
|
||||
|
@ -3,66 +3,56 @@
|
||||
fn num_to_digit(_1: char) -> u32 {
|
||||
debug num => _1;
|
||||
let mut _0: u32;
|
||||
let mut _5: std::option::Option<u32>;
|
||||
let mut _4: std::option::Option<u32>;
|
||||
scope 1 (inlined char::methods::<impl char>::is_digit) {
|
||||
debug self => _1;
|
||||
debug radix => const 8_u32;
|
||||
let _2: std::option::Option<u32>;
|
||||
let mut _3: &std::option::Option<u32>;
|
||||
scope 2 (inlined Option::<u32>::is_some) {
|
||||
debug self => _3;
|
||||
let mut _4: isize;
|
||||
let mut _3: isize;
|
||||
}
|
||||
}
|
||||
scope 3 (inlined #[track_caller] Option::<u32>::unwrap) {
|
||||
debug self => _5;
|
||||
let mut _6: isize;
|
||||
let mut _7: !;
|
||||
let mut _5: isize;
|
||||
let mut _6: !;
|
||||
scope 4 {
|
||||
debug val => _0;
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_3);
|
||||
StorageLive(_2);
|
||||
_2 = char::methods::<impl char>::to_digit(_1, const 8_u32) -> [return: bb1, unwind continue];
|
||||
}
|
||||
|
||||
bb1: {
|
||||
_3 = &_2;
|
||||
StorageLive(_4);
|
||||
_4 = discriminant(_2);
|
||||
switchInt(move _4) -> [1: bb2, 0: bb6, otherwise: bb8];
|
||||
StorageLive(_3);
|
||||
_3 = discriminant(_2);
|
||||
switchInt(move _3) -> [1: bb2, 0: bb6, otherwise: bb8];
|
||||
}
|
||||
|
||||
bb2: {
|
||||
StorageDead(_4);
|
||||
StorageDead(_3);
|
||||
StorageDead(_2);
|
||||
StorageLive(_5);
|
||||
_5 = char::methods::<impl char>::to_digit(move _1, const 8_u32) -> [return: bb3, unwind continue];
|
||||
StorageLive(_4);
|
||||
_4 = char::methods::<impl char>::to_digit(move _1, const 8_u32) -> [return: bb3, unwind continue];
|
||||
}
|
||||
|
||||
bb3: {
|
||||
StorageLive(_6);
|
||||
_6 = discriminant(_5);
|
||||
switchInt(move _6) -> [0: bb4, 1: bb5, otherwise: bb8];
|
||||
StorageLive(_5);
|
||||
_5 = discriminant(_4);
|
||||
switchInt(move _5) -> [0: bb4, 1: bb5, otherwise: bb8];
|
||||
}
|
||||
|
||||
bb4: {
|
||||
_7 = option::unwrap_failed() -> unwind continue;
|
||||
_6 = option::unwrap_failed() -> unwind continue;
|
||||
}
|
||||
|
||||
bb5: {
|
||||
_0 = move ((_5 as Some).0: u32);
|
||||
StorageDead(_6);
|
||||
_0 = move ((_4 as Some).0: u32);
|
||||
StorageDead(_5);
|
||||
StorageDead(_4);
|
||||
goto -> bb7;
|
||||
}
|
||||
|
||||
bb6: {
|
||||
StorageDead(_4);
|
||||
StorageDead(_3);
|
||||
StorageDead(_2);
|
||||
_0 = const 0_u32;
|
||||
|
@ -16,13 +16,10 @@
|
||||
debug residual => _6;
|
||||
scope 2 {
|
||||
scope 8 (inlined #[track_caller] <Result<i32, i32> as FromResidual<Result<Infallible, i32>>>::from_residual) {
|
||||
debug residual => _8;
|
||||
let _14: i32;
|
||||
let mut _15: i32;
|
||||
scope 9 {
|
||||
debug e => _14;
|
||||
scope 10 (inlined <i32 as From<i32>>::from) {
|
||||
debug t => _14;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -34,16 +31,13 @@
|
||||
}
|
||||
}
|
||||
scope 5 (inlined <Result<i32, i32> as Try>::branch) {
|
||||
debug self => _4;
|
||||
let mut _10: isize;
|
||||
let _11: i32;
|
||||
let _12: i32;
|
||||
let mut _13: std::result::Result<std::convert::Infallible, i32>;
|
||||
scope 6 {
|
||||
debug v => _11;
|
||||
}
|
||||
scope 7 {
|
||||
debug e => _12;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,13 +16,10 @@
|
||||
debug residual => _6;
|
||||
scope 2 {
|
||||
scope 8 (inlined #[track_caller] <Result<i32, i32> as FromResidual<Result<Infallible, i32>>>::from_residual) {
|
||||
debug residual => _8;
|
||||
let _14: i32;
|
||||
let mut _15: i32;
|
||||
scope 9 {
|
||||
debug e => _14;
|
||||
scope 10 (inlined <i32 as From<i32>>::from) {
|
||||
debug t => _14;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -34,16 +31,13 @@
|
||||
}
|
||||
}
|
||||
scope 5 (inlined <Result<i32, i32> as Try>::branch) {
|
||||
debug self => _4;
|
||||
let mut _10: isize;
|
||||
let _11: i32;
|
||||
let _12: i32;
|
||||
let mut _13: std::result::Result<std::convert::Infallible, i32>;
|
||||
scope 6 {
|
||||
debug v => _11;
|
||||
}
|
||||
scope 7 {
|
||||
debug e => _12;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,17 +13,11 @@ fn checked_shl(_1: u32, _2: u32) -> Option<u32> {
|
||||
debug b => _5;
|
||||
}
|
||||
scope 3 (inlined core::num::<impl u32>::overflowing_shl) {
|
||||
debug self => _1;
|
||||
debug rhs => _2;
|
||||
let mut _4: u32;
|
||||
let mut _5: bool;
|
||||
scope 4 (inlined core::num::<impl u32>::wrapping_shl) {
|
||||
debug self => _1;
|
||||
debug rhs => _2;
|
||||
let mut _3: u32;
|
||||
scope 5 (inlined core::num::<impl u32>::unchecked_shl) {
|
||||
debug self => _1;
|
||||
debug rhs => _3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,12 +4,89 @@ fn step_forward(_1: u32, _2: usize) -> u32 {
|
||||
debug x => _1;
|
||||
debug n => _2;
|
||||
let mut _0: u32;
|
||||
scope 1 (inlined <u32 as Step>::forward) {
|
||||
debug start => _1;
|
||||
debug n => _2;
|
||||
let mut _8: u32;
|
||||
scope 2 {
|
||||
}
|
||||
scope 3 (inlined <u32 as Step>::forward_checked) {
|
||||
scope 4 {
|
||||
scope 6 (inlined core::num::<impl u32>::checked_add) {
|
||||
let mut _7: bool;
|
||||
scope 7 {
|
||||
}
|
||||
scope 8 (inlined core::num::<impl u32>::overflowing_add) {
|
||||
let mut _5: (u32, bool);
|
||||
let _6: bool;
|
||||
scope 9 {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
scope 5 (inlined convert::num::ptr_try_from_impls::<impl TryFrom<usize> for u32>::try_from) {
|
||||
let mut _3: bool;
|
||||
let mut _4: u32;
|
||||
}
|
||||
}
|
||||
scope 10 (inlined Option::<u32>::is_none) {
|
||||
scope 11 (inlined Option::<u32>::is_some) {
|
||||
}
|
||||
}
|
||||
scope 12 (inlined core::num::<impl u32>::wrapping_add) {
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
_0 = <u32 as Step>::forward(move _1, move _2) -> [return: bb1, unwind continue];
|
||||
StorageLive(_4);
|
||||
StorageLive(_3);
|
||||
_3 = Gt(_2, const 4294967295_usize);
|
||||
switchInt(move _3) -> [0: bb1, otherwise: bb5];
|
||||
}
|
||||
|
||||
bb1: {
|
||||
_4 = _2 as u32 (IntToInt);
|
||||
StorageDead(_3);
|
||||
StorageLive(_6);
|
||||
StorageLive(_5);
|
||||
_5 = CheckedAdd(_1, _4);
|
||||
_6 = (_5.1: bool);
|
||||
StorageDead(_5);
|
||||
StorageLive(_7);
|
||||
_7 = unlikely(move _6) -> [return: bb2, unwind unreachable];
|
||||
}
|
||||
|
||||
bb2: {
|
||||
switchInt(move _7) -> [0: bb3, otherwise: bb4];
|
||||
}
|
||||
|
||||
bb3: {
|
||||
StorageDead(_7);
|
||||
StorageDead(_6);
|
||||
goto -> bb7;
|
||||
}
|
||||
|
||||
bb4: {
|
||||
StorageDead(_7);
|
||||
StorageDead(_6);
|
||||
goto -> bb6;
|
||||
}
|
||||
|
||||
bb5: {
|
||||
StorageDead(_3);
|
||||
goto -> bb6;
|
||||
}
|
||||
|
||||
bb6: {
|
||||
assert(!const true, "attempt to compute `{} + {}`, which would overflow", const core::num::<impl u32>::MAX, const 1_u32) -> [success: bb7, unwind continue];
|
||||
}
|
||||
|
||||
bb7: {
|
||||
StorageLive(_8);
|
||||
_8 = _2 as u32 (IntToInt);
|
||||
_0 = Add(_1, _8);
|
||||
StorageDead(_8);
|
||||
StorageDead(_4);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -4,71 +4,51 @@ fn <impl at $DIR/derived_ord.rs:6:10: 6:20>::partial_cmp(_1: &MultiField, _2: &M
|
||||
debug self => _1;
|
||||
debug other => _2;
|
||||
let mut _0: std::option::Option<std::cmp::Ordering>;
|
||||
let mut _3: &char;
|
||||
let mut _4: &char;
|
||||
let mut _8: std::option::Option<std::cmp::Ordering>;
|
||||
let mut _9: i8;
|
||||
let mut _10: &i16;
|
||||
let mut _11: &i16;
|
||||
let mut _6: std::option::Option<std::cmp::Ordering>;
|
||||
let mut _7: i8;
|
||||
scope 1 {
|
||||
debug cmp => _8;
|
||||
debug cmp => _6;
|
||||
}
|
||||
scope 2 (inlined std::cmp::impls::<impl PartialOrd for char>::partial_cmp) {
|
||||
debug self => _3;
|
||||
debug other => _4;
|
||||
let mut _5: char;
|
||||
let mut _6: char;
|
||||
let mut _7: std::cmp::Ordering;
|
||||
let mut _3: char;
|
||||
let mut _4: char;
|
||||
let mut _5: std::cmp::Ordering;
|
||||
}
|
||||
scope 3 (inlined std::cmp::impls::<impl PartialOrd for i16>::partial_cmp) {
|
||||
debug self => _10;
|
||||
debug other => _11;
|
||||
let mut _12: i16;
|
||||
let mut _13: i16;
|
||||
let mut _14: std::cmp::Ordering;
|
||||
let mut _8: i16;
|
||||
let mut _9: i16;
|
||||
let mut _10: std::cmp::Ordering;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_3);
|
||||
_3 = &((*_1).0: char);
|
||||
_3 = ((*_1).0: char);
|
||||
StorageLive(_4);
|
||||
_4 = &((*_2).0: char);
|
||||
StorageLive(_5);
|
||||
_5 = ((*_1).0: char);
|
||||
StorageLive(_6);
|
||||
_6 = ((*_2).0: char);
|
||||
_7 = Cmp(move _5, move _6);
|
||||
StorageDead(_6);
|
||||
StorageDead(_5);
|
||||
_8 = Option::<std::cmp::Ordering>::Some(_7);
|
||||
_4 = ((*_2).0: char);
|
||||
_5 = Cmp(move _3, move _4);
|
||||
StorageDead(_4);
|
||||
StorageDead(_3);
|
||||
_9 = discriminant(_7);
|
||||
switchInt(move _9) -> [0: bb1, otherwise: bb2];
|
||||
_6 = Option::<std::cmp::Ordering>::Some(_5);
|
||||
_7 = discriminant(_5);
|
||||
switchInt(move _7) -> [0: bb1, otherwise: bb2];
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageLive(_10);
|
||||
_10 = &((*_1).1: i16);
|
||||
StorageLive(_11);
|
||||
_11 = &((*_2).1: i16);
|
||||
StorageLive(_14);
|
||||
StorageLive(_12);
|
||||
_12 = ((*_1).1: i16);
|
||||
StorageLive(_13);
|
||||
_13 = ((*_2).1: i16);
|
||||
_14 = Cmp(move _12, move _13);
|
||||
StorageDead(_13);
|
||||
StorageDead(_12);
|
||||
_0 = Option::<std::cmp::Ordering>::Some(move _14);
|
||||
StorageDead(_14);
|
||||
StorageDead(_11);
|
||||
StorageLive(_8);
|
||||
_8 = ((*_1).1: i16);
|
||||
StorageLive(_9);
|
||||
_9 = ((*_2).1: i16);
|
||||
_10 = Cmp(move _8, move _9);
|
||||
StorageDead(_9);
|
||||
StorageDead(_8);
|
||||
_0 = Option::<std::cmp::Ordering>::Some(move _10);
|
||||
StorageDead(_10);
|
||||
goto -> bb3;
|
||||
}
|
||||
|
||||
bb2: {
|
||||
_0 = _8;
|
||||
_0 = _6;
|
||||
goto -> bb3;
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
fn f_u64() -> () {
|
||||
let mut _0: ();
|
||||
scope 1 (inlined f_dispatch::<u64>) {
|
||||
debug t => const 0_u64;
|
||||
let _1: ();
|
||||
scope 2 (inlined std::mem::size_of::<u64>) {
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
fn f_unit() -> () {
|
||||
let mut _0: ();
|
||||
scope 1 (inlined f_dispatch::<()>) {
|
||||
debug t => const ();
|
||||
let _1: ();
|
||||
scope 2 (inlined std::mem::size_of::<()>) {
|
||||
}
|
||||
|
@ -18,11 +18,8 @@
|
||||
debug ptr => _3;
|
||||
}
|
||||
scope 5 (inlined <std::alloc::Global as Allocator>::allocate) {
|
||||
debug self => _9;
|
||||
debug layout => _8;
|
||||
}
|
||||
scope 6 (inlined #[track_caller] Result::<NonNull<[u8]>, std::alloc::AllocError>::unwrap) {
|
||||
debug self => _6;
|
||||
let mut _12: isize;
|
||||
let _13: std::alloc::AllocError;
|
||||
let mut _14: !;
|
||||
@ -30,23 +27,18 @@
|
||||
let mut _16: &dyn std::fmt::Debug;
|
||||
let mut _17: &std::alloc::AllocError;
|
||||
scope 7 {
|
||||
debug t => _5;
|
||||
}
|
||||
scope 8 {
|
||||
debug e => const std::alloc::AllocError;
|
||||
}
|
||||
}
|
||||
scope 9 (inlined NonNull::<[u8]>::as_ptr) {
|
||||
debug self => _5;
|
||||
let mut _18: *const [u8];
|
||||
}
|
||||
}
|
||||
scope 3 (inlined #[track_caller] Option::<Layout>::unwrap) {
|
||||
debug self => _2;
|
||||
let mut _10: isize;
|
||||
let mut _11: !;
|
||||
scope 4 {
|
||||
debug val => _1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,20 +18,15 @@
|
||||
debug ptr => _3;
|
||||
}
|
||||
scope 5 (inlined <std::alloc::Global as Allocator>::allocate) {
|
||||
debug self => _9;
|
||||
debug layout => _8;
|
||||
}
|
||||
scope 6 (inlined NonNull::<[u8]>::as_ptr) {
|
||||
debug self => _5;
|
||||
let mut _12: *const [u8];
|
||||
}
|
||||
}
|
||||
scope 3 (inlined #[track_caller] Option::<Layout>::unwrap) {
|
||||
debug self => _2;
|
||||
let mut _10: isize;
|
||||
let mut _11: !;
|
||||
scope 4 {
|
||||
debug val => _1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,11 +18,8 @@
|
||||
debug ptr => _3;
|
||||
}
|
||||
scope 5 (inlined <std::alloc::Global as Allocator>::allocate) {
|
||||
debug self => _9;
|
||||
debug layout => _8;
|
||||
}
|
||||
scope 6 (inlined #[track_caller] Result::<NonNull<[u8]>, std::alloc::AllocError>::unwrap) {
|
||||
debug self => _6;
|
||||
let mut _12: isize;
|
||||
let _13: std::alloc::AllocError;
|
||||
let mut _14: !;
|
||||
@ -30,23 +27,18 @@
|
||||
let mut _16: &dyn std::fmt::Debug;
|
||||
let mut _17: &std::alloc::AllocError;
|
||||
scope 7 {
|
||||
debug t => _5;
|
||||
}
|
||||
scope 8 {
|
||||
debug e => const std::alloc::AllocError;
|
||||
}
|
||||
}
|
||||
scope 9 (inlined NonNull::<[u8]>::as_ptr) {
|
||||
debug self => _5;
|
||||
let mut _18: *const [u8];
|
||||
}
|
||||
}
|
||||
scope 3 (inlined #[track_caller] Option::<Layout>::unwrap) {
|
||||
debug self => _2;
|
||||
let mut _10: isize;
|
||||
let mut _11: !;
|
||||
scope 4 {
|
||||
debug val => _1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,20 +18,15 @@
|
||||
debug ptr => _3;
|
||||
}
|
||||
scope 5 (inlined <std::alloc::Global as Allocator>::allocate) {
|
||||
debug self => _9;
|
||||
debug layout => _8;
|
||||
}
|
||||
scope 6 (inlined NonNull::<[u8]>::as_ptr) {
|
||||
debug self => _5;
|
||||
let mut _12: *const [u8];
|
||||
}
|
||||
}
|
||||
scope 3 (inlined #[track_caller] Option::<Layout>::unwrap) {
|
||||
debug self => _2;
|
||||
let mut _10: isize;
|
||||
let mut _11: !;
|
||||
scope 4 {
|
||||
debug val => _1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,17 +5,11 @@ fn mem_replace(_1: &mut u32, _2: u32) -> u32 {
|
||||
debug v => _2;
|
||||
let mut _0: u32;
|
||||
scope 1 (inlined std::mem::replace::<u32>) {
|
||||
debug dest => _1;
|
||||
debug src => _2;
|
||||
scope 2 {
|
||||
debug result => _0;
|
||||
scope 4 (inlined std::ptr::write::<u32>) {
|
||||
debug dst => _1;
|
||||
debug src => _2;
|
||||
}
|
||||
}
|
||||
scope 3 (inlined std::ptr::read::<u32>) {
|
||||
debug src => _1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,17 +5,11 @@ fn mem_replace(_1: &mut u32, _2: u32) -> u32 {
|
||||
debug v => _2;
|
||||
let mut _0: u32;
|
||||
scope 1 (inlined std::mem::replace::<u32>) {
|
||||
debug dest => _1;
|
||||
debug src => _2;
|
||||
scope 2 {
|
||||
debug result => _0;
|
||||
scope 4 (inlined std::ptr::write::<u32>) {
|
||||
debug dst => _1;
|
||||
debug src => _2;
|
||||
}
|
||||
}
|
||||
scope 3 (inlined std::ptr::read::<u32>) {
|
||||
debug src => _1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,77 +5,56 @@ fn forward_loop(_1: u32, _2: u32, _3: impl Fn(u32)) -> () {
|
||||
debug end => _2;
|
||||
debug f => _3;
|
||||
let mut _0: ();
|
||||
let mut _4: std::ops::Range<u32>;
|
||||
let mut _5: std::ops::Range<u32>;
|
||||
let mut _6: &mut std::ops::Range<u32>;
|
||||
let mut _14: std::option::Option<u32>;
|
||||
let mut _16: &impl Fn(u32);
|
||||
let mut _17: (u32,);
|
||||
let _18: ();
|
||||
let mut _4: u32;
|
||||
let mut _9: std::option::Option<u32>;
|
||||
let mut _11: &impl Fn(u32);
|
||||
let mut _12: (u32,);
|
||||
let _13: ();
|
||||
scope 1 {
|
||||
debug iter => _5;
|
||||
let _15: u32;
|
||||
debug ((iter: std::ops::Range<u32>).0: u32) => _4;
|
||||
debug ((iter: std::ops::Range<u32>).1: u32) => _2;
|
||||
let _10: u32;
|
||||
scope 2 {
|
||||
debug x => _15;
|
||||
debug x => _10;
|
||||
}
|
||||
scope 4 (inlined iter::range::<impl Iterator for std::ops::Range<u32>>::next) {
|
||||
debug self => _6;
|
||||
scope 5 (inlined <std::ops::Range<u32> as iter::range::RangeIteratorImpl>::spec_next) {
|
||||
debug self => _6;
|
||||
let mut _7: &u32;
|
||||
let mut _8: &u32;
|
||||
let mut _11: bool;
|
||||
let _12: u32;
|
||||
let mut _13: u32;
|
||||
let mut _6: bool;
|
||||
let _7: u32;
|
||||
let mut _8: u32;
|
||||
scope 6 {
|
||||
debug old => _12;
|
||||
}
|
||||
scope 7 (inlined std::cmp::impls::<impl PartialOrd for u32>::lt) {
|
||||
debug self => _7;
|
||||
debug other => _8;
|
||||
let mut _9: u32;
|
||||
let mut _10: u32;
|
||||
let mut _5: u32;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
scope 3 (inlined <std::ops::Range<u32> as IntoIterator>::into_iter) {
|
||||
debug self => _4;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
_4 = std::ops::Range::<u32> { start: _1, end: _2 };
|
||||
StorageLive(_5);
|
||||
_5 = _4;
|
||||
StorageLive(_4);
|
||||
_4 = _1;
|
||||
goto -> bb1;
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageLive(_14);
|
||||
_6 = &mut _5;
|
||||
StorageLive(_12);
|
||||
StorageLive(_11);
|
||||
StorageLive(_7);
|
||||
_7 = &(_5.0: u32);
|
||||
StorageLive(_8);
|
||||
_8 = &(_5.1: u32);
|
||||
StorageLive(_9);
|
||||
_9 = (_5.0: u32);
|
||||
StorageLive(_10);
|
||||
_10 = (_5.1: u32);
|
||||
_11 = Lt(move _9, move _10);
|
||||
StorageDead(_10);
|
||||
StorageDead(_9);
|
||||
switchInt(move _11) -> [0: bb2, otherwise: bb4];
|
||||
StorageLive(_7);
|
||||
StorageLive(_6);
|
||||
StorageLive(_5);
|
||||
_5 = _4;
|
||||
_6 = Lt(move _5, _2);
|
||||
StorageDead(_5);
|
||||
switchInt(move _6) -> [0: bb2, otherwise: bb4];
|
||||
}
|
||||
|
||||
bb2: {
|
||||
StorageDead(_8);
|
||||
StorageDead(_6);
|
||||
StorageDead(_7);
|
||||
StorageDead(_11);
|
||||
StorageDead(_12);
|
||||
StorageDead(_14);
|
||||
StorageDead(_5);
|
||||
StorageDead(_9);
|
||||
StorageDead(_4);
|
||||
drop(_3) -> [return: bb3, unwind unreachable];
|
||||
}
|
||||
|
||||
@ -84,31 +63,29 @@ fn forward_loop(_1: u32, _2: u32, _3: impl Fn(u32)) -> () {
|
||||
}
|
||||
|
||||
bb4: {
|
||||
StorageDead(_8);
|
||||
StorageDead(_7);
|
||||
_12 = (_5.0: u32);
|
||||
StorageLive(_13);
|
||||
_13 = <u32 as Step>::forward_unchecked(_12, const 1_usize) -> [return: bb5, unwind unreachable];
|
||||
_7 = _4;
|
||||
StorageLive(_8);
|
||||
_8 = <u32 as Step>::forward_unchecked(_7, const 1_usize) -> [return: bb5, unwind unreachable];
|
||||
}
|
||||
|
||||
bb5: {
|
||||
(_5.0: u32) = move _13;
|
||||
StorageDead(_13);
|
||||
_14 = Option::<u32>::Some(_12);
|
||||
StorageDead(_11);
|
||||
StorageDead(_12);
|
||||
_15 = ((_14 as Some).0: u32);
|
||||
StorageLive(_16);
|
||||
_16 = &_3;
|
||||
StorageLive(_17);
|
||||
_17 = (_15,);
|
||||
_18 = <impl Fn(u32) as Fn<(u32,)>>::call(move _16, move _17) -> [return: bb6, unwind unreachable];
|
||||
_4 = move _8;
|
||||
StorageDead(_8);
|
||||
_9 = Option::<u32>::Some(_7);
|
||||
StorageDead(_6);
|
||||
StorageDead(_7);
|
||||
_10 = ((_9 as Some).0: u32);
|
||||
StorageLive(_11);
|
||||
_11 = &_3;
|
||||
StorageLive(_12);
|
||||
_12 = (_10,);
|
||||
_13 = <impl Fn(u32) as Fn<(u32,)>>::call(move _11, move _12) -> [return: bb6, unwind unreachable];
|
||||
}
|
||||
|
||||
bb6: {
|
||||
StorageDead(_17);
|
||||
StorageDead(_16);
|
||||
StorageDead(_14);
|
||||
StorageDead(_12);
|
||||
StorageDead(_11);
|
||||
StorageDead(_9);
|
||||
goto -> bb1;
|
||||
}
|
||||
}
|
||||
|
@ -5,77 +5,56 @@ fn forward_loop(_1: u32, _2: u32, _3: impl Fn(u32)) -> () {
|
||||
debug end => _2;
|
||||
debug f => _3;
|
||||
let mut _0: ();
|
||||
let mut _4: std::ops::Range<u32>;
|
||||
let mut _5: std::ops::Range<u32>;
|
||||
let mut _6: &mut std::ops::Range<u32>;
|
||||
let mut _14: std::option::Option<u32>;
|
||||
let mut _16: &impl Fn(u32);
|
||||
let mut _17: (u32,);
|
||||
let _18: ();
|
||||
let mut _4: u32;
|
||||
let mut _9: std::option::Option<u32>;
|
||||
let mut _11: &impl Fn(u32);
|
||||
let mut _12: (u32,);
|
||||
let _13: ();
|
||||
scope 1 {
|
||||
debug iter => _5;
|
||||
let _15: u32;
|
||||
debug ((iter: std::ops::Range<u32>).0: u32) => _4;
|
||||
debug ((iter: std::ops::Range<u32>).1: u32) => _2;
|
||||
let _10: u32;
|
||||
scope 2 {
|
||||
debug x => _15;
|
||||
debug x => _10;
|
||||
}
|
||||
scope 4 (inlined iter::range::<impl Iterator for std::ops::Range<u32>>::next) {
|
||||
debug self => _6;
|
||||
scope 5 (inlined <std::ops::Range<u32> as iter::range::RangeIteratorImpl>::spec_next) {
|
||||
debug self => _6;
|
||||
let mut _7: &u32;
|
||||
let mut _8: &u32;
|
||||
let mut _11: bool;
|
||||
let _12: u32;
|
||||
let mut _13: u32;
|
||||
let mut _6: bool;
|
||||
let _7: u32;
|
||||
let mut _8: u32;
|
||||
scope 6 {
|
||||
debug old => _12;
|
||||
}
|
||||
scope 7 (inlined std::cmp::impls::<impl PartialOrd for u32>::lt) {
|
||||
debug self => _7;
|
||||
debug other => _8;
|
||||
let mut _9: u32;
|
||||
let mut _10: u32;
|
||||
let mut _5: u32;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
scope 3 (inlined <std::ops::Range<u32> as IntoIterator>::into_iter) {
|
||||
debug self => _4;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
_4 = std::ops::Range::<u32> { start: _1, end: _2 };
|
||||
StorageLive(_5);
|
||||
_5 = _4;
|
||||
StorageLive(_4);
|
||||
_4 = _1;
|
||||
goto -> bb1;
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageLive(_14);
|
||||
_6 = &mut _5;
|
||||
StorageLive(_12);
|
||||
StorageLive(_11);
|
||||
StorageLive(_7);
|
||||
_7 = &(_5.0: u32);
|
||||
StorageLive(_8);
|
||||
_8 = &(_5.1: u32);
|
||||
StorageLive(_9);
|
||||
_9 = (_5.0: u32);
|
||||
StorageLive(_10);
|
||||
_10 = (_5.1: u32);
|
||||
_11 = Lt(move _9, move _10);
|
||||
StorageDead(_10);
|
||||
StorageDead(_9);
|
||||
switchInt(move _11) -> [0: bb2, otherwise: bb4];
|
||||
StorageLive(_7);
|
||||
StorageLive(_6);
|
||||
StorageLive(_5);
|
||||
_5 = _4;
|
||||
_6 = Lt(move _5, _2);
|
||||
StorageDead(_5);
|
||||
switchInt(move _6) -> [0: bb2, otherwise: bb4];
|
||||
}
|
||||
|
||||
bb2: {
|
||||
StorageDead(_8);
|
||||
StorageDead(_6);
|
||||
StorageDead(_7);
|
||||
StorageDead(_11);
|
||||
StorageDead(_12);
|
||||
StorageDead(_14);
|
||||
StorageDead(_5);
|
||||
StorageDead(_9);
|
||||
StorageDead(_4);
|
||||
drop(_3) -> [return: bb3, unwind continue];
|
||||
}
|
||||
|
||||
@ -84,31 +63,29 @@ fn forward_loop(_1: u32, _2: u32, _3: impl Fn(u32)) -> () {
|
||||
}
|
||||
|
||||
bb4: {
|
||||
StorageDead(_8);
|
||||
StorageDead(_7);
|
||||
_12 = (_5.0: u32);
|
||||
StorageLive(_13);
|
||||
_13 = <u32 as Step>::forward_unchecked(_12, const 1_usize) -> [return: bb5, unwind: bb7];
|
||||
_7 = _4;
|
||||
StorageLive(_8);
|
||||
_8 = <u32 as Step>::forward_unchecked(_7, const 1_usize) -> [return: bb5, unwind: bb7];
|
||||
}
|
||||
|
||||
bb5: {
|
||||
(_5.0: u32) = move _13;
|
||||
StorageDead(_13);
|
||||
_14 = Option::<u32>::Some(_12);
|
||||
StorageDead(_11);
|
||||
StorageDead(_12);
|
||||
_15 = ((_14 as Some).0: u32);
|
||||
StorageLive(_16);
|
||||
_16 = &_3;
|
||||
StorageLive(_17);
|
||||
_17 = (_15,);
|
||||
_18 = <impl Fn(u32) as Fn<(u32,)>>::call(move _16, move _17) -> [return: bb6, unwind: bb7];
|
||||
_4 = move _8;
|
||||
StorageDead(_8);
|
||||
_9 = Option::<u32>::Some(_7);
|
||||
StorageDead(_6);
|
||||
StorageDead(_7);
|
||||
_10 = ((_9 as Some).0: u32);
|
||||
StorageLive(_11);
|
||||
_11 = &_3;
|
||||
StorageLive(_12);
|
||||
_12 = (_10,);
|
||||
_13 = <impl Fn(u32) as Fn<(u32,)>>::call(move _11, move _12) -> [return: bb6, unwind: bb7];
|
||||
}
|
||||
|
||||
bb6: {
|
||||
StorageDead(_17);
|
||||
StorageDead(_16);
|
||||
StorageDead(_14);
|
||||
StorageDead(_12);
|
||||
StorageDead(_11);
|
||||
StorageDead(_9);
|
||||
goto -> bb1;
|
||||
}
|
||||
|
||||
|
@ -20,15 +20,11 @@ fn inclusive_loop(_1: u32, _2: u32, _3: impl Fn(u32)) -> () {
|
||||
debug x => _9;
|
||||
}
|
||||
scope 5 (inlined iter::range::<impl Iterator for RangeInclusive<u32>>::next) {
|
||||
debug self => _6;
|
||||
}
|
||||
}
|
||||
scope 3 (inlined RangeInclusive::<u32>::new) {
|
||||
debug start => _1;
|
||||
debug end => _2;
|
||||
}
|
||||
scope 4 (inlined <RangeInclusive<u32> as IntoIterator>::into_iter) {
|
||||
debug self => _4;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
|
@ -20,15 +20,11 @@ fn inclusive_loop(_1: u32, _2: u32, _3: impl Fn(u32)) -> () {
|
||||
debug x => _9;
|
||||
}
|
||||
scope 5 (inlined iter::range::<impl Iterator for RangeInclusive<u32>>::next) {
|
||||
debug self => _6;
|
||||
}
|
||||
}
|
||||
scope 3 (inlined RangeInclusive::<u32>::new) {
|
||||
debug start => _1;
|
||||
debug end => _2;
|
||||
}
|
||||
scope 4 (inlined <RangeInclusive<u32> as IntoIterator>::into_iter) {
|
||||
debug self => _4;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
|
@ -4,7 +4,6 @@ fn range_inclusive_iter_next(_1: &mut RangeInclusive<u32>) -> Option<u32> {
|
||||
debug it => _1;
|
||||
let mut _0: std::option::Option<u32>;
|
||||
scope 1 (inlined iter::range::<impl Iterator for RangeInclusive<u32>>::next) {
|
||||
debug self => _1;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
|
@ -4,7 +4,6 @@ fn range_inclusive_iter_next(_1: &mut RangeInclusive<u32>) -> Option<u32> {
|
||||
debug it => _1;
|
||||
let mut _0: std::option::Option<u32>;
|
||||
scope 1 (inlined iter::range::<impl Iterator for RangeInclusive<u32>>::next) {
|
||||
debug self => _1;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
|
@ -4,68 +4,53 @@ fn range_iter_next(_1: &mut std::ops::Range<u32>) -> Option<u32> {
|
||||
debug it => _1;
|
||||
let mut _0: std::option::Option<u32>;
|
||||
scope 1 (inlined iter::range::<impl Iterator for std::ops::Range<u32>>::next) {
|
||||
debug self => _1;
|
||||
scope 2 (inlined <std::ops::Range<u32> as iter::range::RangeIteratorImpl>::spec_next) {
|
||||
debug self => _1;
|
||||
let mut _2: &u32;
|
||||
let mut _3: &u32;
|
||||
let mut _6: bool;
|
||||
let _7: u32;
|
||||
let mut _8: u32;
|
||||
let mut _4: bool;
|
||||
let _5: u32;
|
||||
let mut _6: u32;
|
||||
scope 3 {
|
||||
debug old => _7;
|
||||
}
|
||||
scope 4 (inlined std::cmp::impls::<impl PartialOrd for u32>::lt) {
|
||||
debug self => _2;
|
||||
debug other => _3;
|
||||
let mut _4: u32;
|
||||
let mut _5: u32;
|
||||
let mut _2: u32;
|
||||
let mut _3: u32;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_7);
|
||||
StorageLive(_6);
|
||||
StorageLive(_2);
|
||||
_2 = &((*_1).0: u32);
|
||||
StorageLive(_3);
|
||||
_3 = &((*_1).1: u32);
|
||||
StorageLive(_4);
|
||||
_4 = ((*_1).0: u32);
|
||||
StorageLive(_5);
|
||||
_5 = ((*_1).1: u32);
|
||||
_6 = Lt(move _4, move _5);
|
||||
StorageDead(_5);
|
||||
StorageDead(_4);
|
||||
switchInt(move _6) -> [0: bb1, otherwise: bb2];
|
||||
StorageLive(_4);
|
||||
StorageLive(_2);
|
||||
_2 = ((*_1).0: u32);
|
||||
StorageLive(_3);
|
||||
_3 = ((*_1).1: u32);
|
||||
_4 = Lt(move _2, move _3);
|
||||
StorageDead(_3);
|
||||
StorageDead(_2);
|
||||
switchInt(move _4) -> [0: bb1, otherwise: bb2];
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageDead(_3);
|
||||
StorageDead(_2);
|
||||
_0 = const Option::<u32>::None;
|
||||
goto -> bb4;
|
||||
}
|
||||
|
||||
bb2: {
|
||||
StorageDead(_3);
|
||||
StorageDead(_2);
|
||||
_7 = ((*_1).0: u32);
|
||||
StorageLive(_8);
|
||||
_8 = <u32 as Step>::forward_unchecked(_7, const 1_usize) -> [return: bb3, unwind unreachable];
|
||||
_5 = ((*_1).0: u32);
|
||||
StorageLive(_6);
|
||||
_6 = <u32 as Step>::forward_unchecked(_5, const 1_usize) -> [return: bb3, unwind unreachable];
|
||||
}
|
||||
|
||||
bb3: {
|
||||
((*_1).0: u32) = move _8;
|
||||
StorageDead(_8);
|
||||
_0 = Option::<u32>::Some(_7);
|
||||
((*_1).0: u32) = move _6;
|
||||
StorageDead(_6);
|
||||
_0 = Option::<u32>::Some(_5);
|
||||
goto -> bb4;
|
||||
}
|
||||
|
||||
bb4: {
|
||||
StorageDead(_6);
|
||||
StorageDead(_7);
|
||||
StorageDead(_4);
|
||||
StorageDead(_5);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -4,68 +4,53 @@ fn range_iter_next(_1: &mut std::ops::Range<u32>) -> Option<u32> {
|
||||
debug it => _1;
|
||||
let mut _0: std::option::Option<u32>;
|
||||
scope 1 (inlined iter::range::<impl Iterator for std::ops::Range<u32>>::next) {
|
||||
debug self => _1;
|
||||
scope 2 (inlined <std::ops::Range<u32> as iter::range::RangeIteratorImpl>::spec_next) {
|
||||
debug self => _1;
|
||||
let mut _2: &u32;
|
||||
let mut _3: &u32;
|
||||
let mut _6: bool;
|
||||
let _7: u32;
|
||||
let mut _8: u32;
|
||||
let mut _4: bool;
|
||||
let _5: u32;
|
||||
let mut _6: u32;
|
||||
scope 3 {
|
||||
debug old => _7;
|
||||
}
|
||||
scope 4 (inlined std::cmp::impls::<impl PartialOrd for u32>::lt) {
|
||||
debug self => _2;
|
||||
debug other => _3;
|
||||
let mut _4: u32;
|
||||
let mut _5: u32;
|
||||
let mut _2: u32;
|
||||
let mut _3: u32;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_7);
|
||||
StorageLive(_6);
|
||||
StorageLive(_2);
|
||||
_2 = &((*_1).0: u32);
|
||||
StorageLive(_3);
|
||||
_3 = &((*_1).1: u32);
|
||||
StorageLive(_4);
|
||||
_4 = ((*_1).0: u32);
|
||||
StorageLive(_5);
|
||||
_5 = ((*_1).1: u32);
|
||||
_6 = Lt(move _4, move _5);
|
||||
StorageDead(_5);
|
||||
StorageDead(_4);
|
||||
switchInt(move _6) -> [0: bb1, otherwise: bb2];
|
||||
StorageLive(_4);
|
||||
StorageLive(_2);
|
||||
_2 = ((*_1).0: u32);
|
||||
StorageLive(_3);
|
||||
_3 = ((*_1).1: u32);
|
||||
_4 = Lt(move _2, move _3);
|
||||
StorageDead(_3);
|
||||
StorageDead(_2);
|
||||
switchInt(move _4) -> [0: bb1, otherwise: bb2];
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageDead(_3);
|
||||
StorageDead(_2);
|
||||
_0 = const Option::<u32>::None;
|
||||
goto -> bb4;
|
||||
}
|
||||
|
||||
bb2: {
|
||||
StorageDead(_3);
|
||||
StorageDead(_2);
|
||||
_7 = ((*_1).0: u32);
|
||||
StorageLive(_8);
|
||||
_8 = <u32 as Step>::forward_unchecked(_7, const 1_usize) -> [return: bb3, unwind continue];
|
||||
_5 = ((*_1).0: u32);
|
||||
StorageLive(_6);
|
||||
_6 = <u32 as Step>::forward_unchecked(_5, const 1_usize) -> [return: bb3, unwind continue];
|
||||
}
|
||||
|
||||
bb3: {
|
||||
((*_1).0: u32) = move _8;
|
||||
StorageDead(_8);
|
||||
_0 = Option::<u32>::Some(_7);
|
||||
((*_1).0: u32) = move _6;
|
||||
StorageDead(_6);
|
||||
_0 = Option::<u32>::Some(_5);
|
||||
goto -> bb4;
|
||||
}
|
||||
|
||||
bb4: {
|
||||
StorageDead(_6);
|
||||
StorageDead(_7);
|
||||
StorageDead(_4);
|
||||
StorageDead(_5);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -4,15 +4,11 @@ fn ezmap(_1: Option<i32>) -> Option<i32> {
|
||||
debug x => _1;
|
||||
let mut _0: std::option::Option<i32>;
|
||||
scope 1 (inlined map::<i32, i32, {closure@$DIR/simple_option_map.rs:17:12: 17:15}>) {
|
||||
debug slf => _1;
|
||||
debug f => const ZeroSized: {closure@$DIR/simple_option_map.rs:17:12: 17:15};
|
||||
let mut _2: isize;
|
||||
let _3: i32;
|
||||
let mut _4: i32;
|
||||
scope 2 {
|
||||
debug x => _3;
|
||||
scope 3 (inlined ezmap::{closure#0}) {
|
||||
debug n => _3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,6 @@ fn slice_get_mut_usize(_1: &mut [u32], _2: usize) -> Option<&mut u32> {
|
||||
debug index => _2;
|
||||
let mut _0: std::option::Option<&mut u32>;
|
||||
scope 1 (inlined core::slice::<impl [u32]>::get_mut::<usize>) {
|
||||
debug self => _1;
|
||||
debug index => _2;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
|
@ -5,8 +5,6 @@ fn slice_get_mut_usize(_1: &mut [u32], _2: usize) -> Option<&mut u32> {
|
||||
debug index => _2;
|
||||
let mut _0: std::option::Option<&mut u32>;
|
||||
scope 1 (inlined core::slice::<impl [u32]>::get_mut::<usize>) {
|
||||
debug self => _1;
|
||||
debug index => _2;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
|
@ -5,8 +5,6 @@ fn slice_get_unchecked_mut_range(_1: &mut [u32], _2: std::ops::Range<usize>) ->
|
||||
debug index => _2;
|
||||
let mut _0: &mut [u32];
|
||||
scope 1 (inlined core::slice::<impl [u32]>::get_unchecked_mut::<std::ops::Range<usize>>) {
|
||||
debug self => _1;
|
||||
debug index => _2;
|
||||
let mut _3: *mut [u32];
|
||||
let mut _4: *mut [u32];
|
||||
}
|
||||
|
@ -5,8 +5,6 @@ fn slice_get_unchecked_mut_range(_1: &mut [u32], _2: std::ops::Range<usize>) ->
|
||||
debug index => _2;
|
||||
let mut _0: &mut [u32];
|
||||
scope 1 (inlined core::slice::<impl [u32]>::get_unchecked_mut::<std::ops::Range<usize>>) {
|
||||
debug self => _1;
|
||||
debug index => _2;
|
||||
let mut _3: *mut [u32];
|
||||
let mut _4: *mut [u32];
|
||||
}
|
||||
|
@ -5,8 +5,6 @@ fn slice_index_range(_1: &[u32], _2: std::ops::Range<usize>) -> &[u32] {
|
||||
debug index => _2;
|
||||
let mut _0: &[u32];
|
||||
scope 1 (inlined #[track_caller] core::slice::index::<impl Index<std::ops::Range<usize>> for [u32]>::index) {
|
||||
debug self => _1;
|
||||
debug index => _2;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
|
@ -5,8 +5,6 @@ fn slice_index_range(_1: &[u32], _2: std::ops::Range<usize>) -> &[u32] {
|
||||
debug index => _2;
|
||||
let mut _0: &[u32];
|
||||
scope 1 (inlined #[track_caller] core::slice::index::<impl Index<std::ops::Range<usize>> for [u32]>::index) {
|
||||
debug self => _1;
|
||||
debug index => _2;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
|
@ -4,147 +4,128 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
|
||||
debug slice => _1;
|
||||
debug f => _2;
|
||||
let mut _0: ();
|
||||
let mut _13: std::slice::Iter<'_, T>;
|
||||
let mut _12: std::slice::Iter<'_, T>;
|
||||
let mut _13: std::iter::Enumerate<std::slice::Iter<'_, T>>;
|
||||
let mut _14: std::iter::Enumerate<std::slice::Iter<'_, T>>;
|
||||
let mut _15: std::iter::Enumerate<std::slice::Iter<'_, T>>;
|
||||
let mut _16: &mut std::iter::Enumerate<std::slice::Iter<'_, T>>;
|
||||
let mut _17: std::option::Option<(usize, &T)>;
|
||||
let mut _18: isize;
|
||||
let mut _21: &impl Fn(usize, &T);
|
||||
let mut _22: (usize, &T);
|
||||
let _23: ();
|
||||
let mut _15: &mut std::iter::Enumerate<std::slice::Iter<'_, T>>;
|
||||
let mut _16: std::option::Option<(usize, &T)>;
|
||||
let mut _17: isize;
|
||||
let mut _20: &impl Fn(usize, &T);
|
||||
let mut _21: (usize, &T);
|
||||
let _22: ();
|
||||
scope 1 {
|
||||
debug iter => _15;
|
||||
let _19: usize;
|
||||
let _20: &T;
|
||||
debug iter => _14;
|
||||
let _18: usize;
|
||||
let _19: &T;
|
||||
scope 2 {
|
||||
debug i => _19;
|
||||
debug x => _20;
|
||||
debug i => _18;
|
||||
debug x => _19;
|
||||
}
|
||||
}
|
||||
scope 3 (inlined core::slice::<impl [T]>::iter) {
|
||||
debug self => _1;
|
||||
scope 4 (inlined std::slice::Iter::<'_, T>::new) {
|
||||
debug slice => _1;
|
||||
let _3: usize;
|
||||
let mut _5: std::ptr::NonNull<[T]>;
|
||||
let mut _8: bool;
|
||||
let mut _7: bool;
|
||||
let mut _8: *mut T;
|
||||
let mut _9: *mut T;
|
||||
let mut _10: *mut T;
|
||||
let mut _12: *const T;
|
||||
let mut _11: *const T;
|
||||
scope 5 {
|
||||
debug len => _3;
|
||||
let _7: std::ptr::NonNull<T>;
|
||||
let _6: std::ptr::NonNull<T>;
|
||||
scope 6 {
|
||||
debug ptr => _7;
|
||||
let _11: *const T;
|
||||
let _10: *const T;
|
||||
scope 7 {
|
||||
debug end_or_len => _11;
|
||||
}
|
||||
scope 11 (inlined without_provenance::<T>) {
|
||||
debug addr => _3;
|
||||
}
|
||||
scope 12 (inlined NonNull::<T>::as_ptr) {
|
||||
debug self => _7;
|
||||
}
|
||||
scope 13 (inlined std::ptr::mut_ptr::<impl *mut T>::add) {
|
||||
debug self => _9;
|
||||
debug count => _3;
|
||||
}
|
||||
}
|
||||
scope 8 (inlined <NonNull<[T]> as From<&[T]>>::from) {
|
||||
debug reference => _1;
|
||||
let mut _4: *const [T];
|
||||
}
|
||||
scope 9 (inlined NonNull::<[T]>::cast::<T>) {
|
||||
debug self => _5;
|
||||
let mut _6: *const T;
|
||||
let mut _5: *const T;
|
||||
scope 10 (inlined NonNull::<[T]>::as_ptr) {
|
||||
debug self => _5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
scope 14 (inlined <std::slice::Iter<'_, T> as Iterator>::enumerate) {
|
||||
debug self => _13;
|
||||
scope 15 (inlined Enumerate::<std::slice::Iter<'_, T>>::new) {
|
||||
debug iter => _13;
|
||||
}
|
||||
}
|
||||
scope 16 (inlined <Enumerate<std::slice::Iter<'_, T>> as IntoIterator>::into_iter) {
|
||||
debug self => _14;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_13);
|
||||
StorageLive(_12);
|
||||
StorageLive(_3);
|
||||
StorageLive(_7);
|
||||
StorageLive(_4);
|
||||
StorageLive(_6);
|
||||
_3 = Len((*_1));
|
||||
StorageLive(_4);
|
||||
StorageLive(_5);
|
||||
_3 = Len((*_1));
|
||||
_4 = &raw const (*_1);
|
||||
_5 = NonNull::<[T]> { pointer: _4 };
|
||||
_6 = _4 as *const T (PtrToPtr);
|
||||
_7 = NonNull::<T> { pointer: _6 };
|
||||
StorageDead(_5);
|
||||
StorageLive(_11);
|
||||
StorageLive(_8);
|
||||
_8 = const <T as std::mem::SizedTypeProperties>::IS_ZST;
|
||||
switchInt(move _8) -> [0: bb1, otherwise: bb2];
|
||||
_5 = _4 as *const T (PtrToPtr);
|
||||
_6 = NonNull::<T> { pointer: _5 };
|
||||
StorageLive(_10);
|
||||
StorageLive(_7);
|
||||
_7 = const <T as std::mem::SizedTypeProperties>::IS_ZST;
|
||||
switchInt(move _7) -> [0: bb1, otherwise: bb2];
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageLive(_10);
|
||||
StorageLive(_9);
|
||||
_9 = _4 as *mut T (PtrToPtr);
|
||||
_10 = Offset(_9, _3);
|
||||
StorageLive(_8);
|
||||
_8 = _4 as *mut T (PtrToPtr);
|
||||
_9 = Offset(_8, _3);
|
||||
StorageDead(_8);
|
||||
_10 = move _9 as *const T (PointerCoercion(MutToConstPointer));
|
||||
StorageDead(_9);
|
||||
_11 = move _10 as *const T (PointerCoercion(MutToConstPointer));
|
||||
StorageDead(_10);
|
||||
goto -> bb3;
|
||||
}
|
||||
|
||||
bb2: {
|
||||
_11 = _3 as *const T (Transmute);
|
||||
_10 = _3 as *const T (Transmute);
|
||||
goto -> bb3;
|
||||
}
|
||||
|
||||
bb3: {
|
||||
StorageDead(_8);
|
||||
StorageLive(_12);
|
||||
_12 = _11;
|
||||
_13 = std::slice::Iter::<'_, T> { ptr: _7, end_or_len: move _12, _marker: const ZeroSized: PhantomData<&T> };
|
||||
StorageDead(_12);
|
||||
StorageDead(_11);
|
||||
StorageDead(_6);
|
||||
StorageDead(_4);
|
||||
StorageDead(_7);
|
||||
StorageLive(_11);
|
||||
_11 = _10;
|
||||
_12 = std::slice::Iter::<'_, T> { ptr: _6, end_or_len: move _11, _marker: const ZeroSized: PhantomData<&T> };
|
||||
StorageDead(_11);
|
||||
StorageDead(_10);
|
||||
StorageDead(_5);
|
||||
StorageDead(_4);
|
||||
StorageDead(_6);
|
||||
StorageDead(_3);
|
||||
_14 = Enumerate::<std::slice::Iter<'_, T>> { iter: _13, count: const 0_usize };
|
||||
StorageDead(_13);
|
||||
StorageLive(_15);
|
||||
_15 = _14;
|
||||
_13 = Enumerate::<std::slice::Iter<'_, T>> { iter: _12, count: const 0_usize };
|
||||
StorageDead(_12);
|
||||
StorageLive(_14);
|
||||
_14 = _13;
|
||||
goto -> bb4;
|
||||
}
|
||||
|
||||
bb4: {
|
||||
StorageLive(_17);
|
||||
StorageLive(_16);
|
||||
_16 = &mut _15;
|
||||
_17 = <Enumerate<std::slice::Iter<'_, T>> as Iterator>::next(move _16) -> [return: bb5, unwind unreachable];
|
||||
StorageLive(_15);
|
||||
_15 = &mut _14;
|
||||
_16 = <Enumerate<std::slice::Iter<'_, T>> as Iterator>::next(move _15) -> [return: bb5, unwind unreachable];
|
||||
}
|
||||
|
||||
bb5: {
|
||||
StorageDead(_16);
|
||||
_18 = discriminant(_17);
|
||||
switchInt(move _18) -> [0: bb6, 1: bb8, otherwise: bb10];
|
||||
StorageDead(_15);
|
||||
_17 = discriminant(_16);
|
||||
switchInt(move _17) -> [0: bb6, 1: bb8, otherwise: bb10];
|
||||
}
|
||||
|
||||
bb6: {
|
||||
StorageDead(_17);
|
||||
StorageDead(_15);
|
||||
StorageDead(_16);
|
||||
StorageDead(_14);
|
||||
drop(_2) -> [return: bb7, unwind unreachable];
|
||||
}
|
||||
|
||||
@ -153,19 +134,19 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
|
||||
}
|
||||
|
||||
bb8: {
|
||||
_19 = (((_17 as Some).0: (usize, &T)).0: usize);
|
||||
_20 = (((_17 as Some).0: (usize, &T)).1: &T);
|
||||
_18 = (((_16 as Some).0: (usize, &T)).0: usize);
|
||||
_19 = (((_16 as Some).0: (usize, &T)).1: &T);
|
||||
StorageLive(_20);
|
||||
_20 = &_2;
|
||||
StorageLive(_21);
|
||||
_21 = &_2;
|
||||
StorageLive(_22);
|
||||
_22 = (_19, _20);
|
||||
_23 = <impl Fn(usize, &T) as Fn<(usize, &T)>>::call(move _21, move _22) -> [return: bb9, unwind unreachable];
|
||||
_21 = (_18, _19);
|
||||
_22 = <impl Fn(usize, &T) as Fn<(usize, &T)>>::call(move _20, move _21) -> [return: bb9, unwind unreachable];
|
||||
}
|
||||
|
||||
bb9: {
|
||||
StorageDead(_22);
|
||||
StorageDead(_21);
|
||||
StorageDead(_17);
|
||||
StorageDead(_20);
|
||||
StorageDead(_16);
|
||||
goto -> bb4;
|
||||
}
|
||||
|
||||
|
@ -4,147 +4,128 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
|
||||
debug slice => _1;
|
||||
debug f => _2;
|
||||
let mut _0: ();
|
||||
let mut _13: std::slice::Iter<'_, T>;
|
||||
let mut _12: std::slice::Iter<'_, T>;
|
||||
let mut _13: std::iter::Enumerate<std::slice::Iter<'_, T>>;
|
||||
let mut _14: std::iter::Enumerate<std::slice::Iter<'_, T>>;
|
||||
let mut _15: std::iter::Enumerate<std::slice::Iter<'_, T>>;
|
||||
let mut _16: &mut std::iter::Enumerate<std::slice::Iter<'_, T>>;
|
||||
let mut _17: std::option::Option<(usize, &T)>;
|
||||
let mut _18: isize;
|
||||
let mut _21: &impl Fn(usize, &T);
|
||||
let mut _22: (usize, &T);
|
||||
let _23: ();
|
||||
let mut _15: &mut std::iter::Enumerate<std::slice::Iter<'_, T>>;
|
||||
let mut _16: std::option::Option<(usize, &T)>;
|
||||
let mut _17: isize;
|
||||
let mut _20: &impl Fn(usize, &T);
|
||||
let mut _21: (usize, &T);
|
||||
let _22: ();
|
||||
scope 1 {
|
||||
debug iter => _15;
|
||||
let _19: usize;
|
||||
let _20: &T;
|
||||
debug iter => _14;
|
||||
let _18: usize;
|
||||
let _19: &T;
|
||||
scope 2 {
|
||||
debug i => _19;
|
||||
debug x => _20;
|
||||
debug i => _18;
|
||||
debug x => _19;
|
||||
}
|
||||
}
|
||||
scope 3 (inlined core::slice::<impl [T]>::iter) {
|
||||
debug self => _1;
|
||||
scope 4 (inlined std::slice::Iter::<'_, T>::new) {
|
||||
debug slice => _1;
|
||||
let _3: usize;
|
||||
let mut _5: std::ptr::NonNull<[T]>;
|
||||
let mut _8: bool;
|
||||
let mut _7: bool;
|
||||
let mut _8: *mut T;
|
||||
let mut _9: *mut T;
|
||||
let mut _10: *mut T;
|
||||
let mut _12: *const T;
|
||||
let mut _11: *const T;
|
||||
scope 5 {
|
||||
debug len => _3;
|
||||
let _7: std::ptr::NonNull<T>;
|
||||
let _6: std::ptr::NonNull<T>;
|
||||
scope 6 {
|
||||
debug ptr => _7;
|
||||
let _11: *const T;
|
||||
let _10: *const T;
|
||||
scope 7 {
|
||||
debug end_or_len => _11;
|
||||
}
|
||||
scope 11 (inlined without_provenance::<T>) {
|
||||
debug addr => _3;
|
||||
}
|
||||
scope 12 (inlined NonNull::<T>::as_ptr) {
|
||||
debug self => _7;
|
||||
}
|
||||
scope 13 (inlined std::ptr::mut_ptr::<impl *mut T>::add) {
|
||||
debug self => _9;
|
||||
debug count => _3;
|
||||
}
|
||||
}
|
||||
scope 8 (inlined <NonNull<[T]> as From<&[T]>>::from) {
|
||||
debug reference => _1;
|
||||
let mut _4: *const [T];
|
||||
}
|
||||
scope 9 (inlined NonNull::<[T]>::cast::<T>) {
|
||||
debug self => _5;
|
||||
let mut _6: *const T;
|
||||
let mut _5: *const T;
|
||||
scope 10 (inlined NonNull::<[T]>::as_ptr) {
|
||||
debug self => _5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
scope 14 (inlined <std::slice::Iter<'_, T> as Iterator>::enumerate) {
|
||||
debug self => _13;
|
||||
scope 15 (inlined Enumerate::<std::slice::Iter<'_, T>>::new) {
|
||||
debug iter => _13;
|
||||
}
|
||||
}
|
||||
scope 16 (inlined <Enumerate<std::slice::Iter<'_, T>> as IntoIterator>::into_iter) {
|
||||
debug self => _14;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_13);
|
||||
StorageLive(_12);
|
||||
StorageLive(_3);
|
||||
StorageLive(_7);
|
||||
StorageLive(_4);
|
||||
StorageLive(_6);
|
||||
_3 = Len((*_1));
|
||||
StorageLive(_4);
|
||||
StorageLive(_5);
|
||||
_3 = Len((*_1));
|
||||
_4 = &raw const (*_1);
|
||||
_5 = NonNull::<[T]> { pointer: _4 };
|
||||
_6 = _4 as *const T (PtrToPtr);
|
||||
_7 = NonNull::<T> { pointer: _6 };
|
||||
StorageDead(_5);
|
||||
StorageLive(_11);
|
||||
StorageLive(_8);
|
||||
_8 = const <T as std::mem::SizedTypeProperties>::IS_ZST;
|
||||
switchInt(move _8) -> [0: bb1, otherwise: bb2];
|
||||
_5 = _4 as *const T (PtrToPtr);
|
||||
_6 = NonNull::<T> { pointer: _5 };
|
||||
StorageLive(_10);
|
||||
StorageLive(_7);
|
||||
_7 = const <T as std::mem::SizedTypeProperties>::IS_ZST;
|
||||
switchInt(move _7) -> [0: bb1, otherwise: bb2];
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageLive(_10);
|
||||
StorageLive(_9);
|
||||
_9 = _4 as *mut T (PtrToPtr);
|
||||
_10 = Offset(_9, _3);
|
||||
StorageLive(_8);
|
||||
_8 = _4 as *mut T (PtrToPtr);
|
||||
_9 = Offset(_8, _3);
|
||||
StorageDead(_8);
|
||||
_10 = move _9 as *const T (PointerCoercion(MutToConstPointer));
|
||||
StorageDead(_9);
|
||||
_11 = move _10 as *const T (PointerCoercion(MutToConstPointer));
|
||||
StorageDead(_10);
|
||||
goto -> bb3;
|
||||
}
|
||||
|
||||
bb2: {
|
||||
_11 = _3 as *const T (Transmute);
|
||||
_10 = _3 as *const T (Transmute);
|
||||
goto -> bb3;
|
||||
}
|
||||
|
||||
bb3: {
|
||||
StorageDead(_8);
|
||||
StorageLive(_12);
|
||||
_12 = _11;
|
||||
_13 = std::slice::Iter::<'_, T> { ptr: _7, end_or_len: move _12, _marker: const ZeroSized: PhantomData<&T> };
|
||||
StorageDead(_12);
|
||||
StorageDead(_11);
|
||||
StorageDead(_6);
|
||||
StorageDead(_4);
|
||||
StorageDead(_7);
|
||||
StorageLive(_11);
|
||||
_11 = _10;
|
||||
_12 = std::slice::Iter::<'_, T> { ptr: _6, end_or_len: move _11, _marker: const ZeroSized: PhantomData<&T> };
|
||||
StorageDead(_11);
|
||||
StorageDead(_10);
|
||||
StorageDead(_5);
|
||||
StorageDead(_4);
|
||||
StorageDead(_6);
|
||||
StorageDead(_3);
|
||||
_14 = Enumerate::<std::slice::Iter<'_, T>> { iter: _13, count: const 0_usize };
|
||||
StorageDead(_13);
|
||||
StorageLive(_15);
|
||||
_15 = _14;
|
||||
_13 = Enumerate::<std::slice::Iter<'_, T>> { iter: _12, count: const 0_usize };
|
||||
StorageDead(_12);
|
||||
StorageLive(_14);
|
||||
_14 = _13;
|
||||
goto -> bb4;
|
||||
}
|
||||
|
||||
bb4: {
|
||||
StorageLive(_17);
|
||||
StorageLive(_16);
|
||||
_16 = &mut _15;
|
||||
_17 = <Enumerate<std::slice::Iter<'_, T>> as Iterator>::next(move _16) -> [return: bb5, unwind: bb11];
|
||||
StorageLive(_15);
|
||||
_15 = &mut _14;
|
||||
_16 = <Enumerate<std::slice::Iter<'_, T>> as Iterator>::next(move _15) -> [return: bb5, unwind: bb11];
|
||||
}
|
||||
|
||||
bb5: {
|
||||
StorageDead(_16);
|
||||
_18 = discriminant(_17);
|
||||
switchInt(move _18) -> [0: bb6, 1: bb8, otherwise: bb10];
|
||||
StorageDead(_15);
|
||||
_17 = discriminant(_16);
|
||||
switchInt(move _17) -> [0: bb6, 1: bb8, otherwise: bb10];
|
||||
}
|
||||
|
||||
bb6: {
|
||||
StorageDead(_17);
|
||||
StorageDead(_15);
|
||||
StorageDead(_16);
|
||||
StorageDead(_14);
|
||||
drop(_2) -> [return: bb7, unwind continue];
|
||||
}
|
||||
|
||||
@ -153,19 +134,19 @@ fn enumerated_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
|
||||
}
|
||||
|
||||
bb8: {
|
||||
_19 = (((_17 as Some).0: (usize, &T)).0: usize);
|
||||
_20 = (((_17 as Some).0: (usize, &T)).1: &T);
|
||||
_18 = (((_16 as Some).0: (usize, &T)).0: usize);
|
||||
_19 = (((_16 as Some).0: (usize, &T)).1: &T);
|
||||
StorageLive(_20);
|
||||
_20 = &_2;
|
||||
StorageLive(_21);
|
||||
_21 = &_2;
|
||||
StorageLive(_22);
|
||||
_22 = (_19, _20);
|
||||
_23 = <impl Fn(usize, &T) as Fn<(usize, &T)>>::call(move _21, move _22) -> [return: bb9, unwind: bb11];
|
||||
_21 = (_18, _19);
|
||||
_22 = <impl Fn(usize, &T) as Fn<(usize, &T)>>::call(move _20, move _21) -> [return: bb9, unwind: bb11];
|
||||
}
|
||||
|
||||
bb9: {
|
||||
StorageDead(_22);
|
||||
StorageDead(_21);
|
||||
StorageDead(_17);
|
||||
StorageDead(_20);
|
||||
StorageDead(_16);
|
||||
goto -> bb4;
|
||||
}
|
||||
|
||||
|
@ -4,135 +4,118 @@ fn forward_loop(_1: &[T], _2: impl Fn(&T)) -> () {
|
||||
debug slice => _1;
|
||||
debug f => _2;
|
||||
let mut _0: ();
|
||||
let mut _12: std::slice::Iter<'_, T>;
|
||||
let mut _13: std::slice::Iter<'_, T>;
|
||||
let mut _14: std::slice::Iter<'_, T>;
|
||||
let mut _15: &mut std::slice::Iter<'_, T>;
|
||||
let mut _16: std::option::Option<&T>;
|
||||
let mut _17: isize;
|
||||
let mut _19: &impl Fn(&T);
|
||||
let mut _20: (&T,);
|
||||
let _21: ();
|
||||
let mut _14: &mut std::slice::Iter<'_, T>;
|
||||
let mut _15: std::option::Option<&T>;
|
||||
let mut _16: isize;
|
||||
let mut _18: &impl Fn(&T);
|
||||
let mut _19: (&T,);
|
||||
let _20: ();
|
||||
scope 1 {
|
||||
debug iter => _14;
|
||||
let _18: &T;
|
||||
debug iter => _13;
|
||||
let _17: &T;
|
||||
scope 2 {
|
||||
debug x => _18;
|
||||
debug x => _17;
|
||||
}
|
||||
}
|
||||
scope 3 (inlined core::slice::<impl [T]>::iter) {
|
||||
debug self => _1;
|
||||
scope 4 (inlined std::slice::Iter::<'_, T>::new) {
|
||||
debug slice => _1;
|
||||
let _3: usize;
|
||||
let mut _5: std::ptr::NonNull<[T]>;
|
||||
let mut _8: bool;
|
||||
let mut _7: bool;
|
||||
let mut _8: *mut T;
|
||||
let mut _9: *mut T;
|
||||
let mut _10: *mut T;
|
||||
let mut _12: *const T;
|
||||
let mut _11: *const T;
|
||||
scope 5 {
|
||||
debug len => _3;
|
||||
let _7: std::ptr::NonNull<T>;
|
||||
let _6: std::ptr::NonNull<T>;
|
||||
scope 6 {
|
||||
debug ptr => _7;
|
||||
let _11: *const T;
|
||||
let _10: *const T;
|
||||
scope 7 {
|
||||
debug end_or_len => _11;
|
||||
}
|
||||
scope 11 (inlined without_provenance::<T>) {
|
||||
debug addr => _3;
|
||||
}
|
||||
scope 12 (inlined NonNull::<T>::as_ptr) {
|
||||
debug self => _7;
|
||||
}
|
||||
scope 13 (inlined std::ptr::mut_ptr::<impl *mut T>::add) {
|
||||
debug self => _9;
|
||||
debug count => _3;
|
||||
}
|
||||
}
|
||||
scope 8 (inlined <NonNull<[T]> as From<&[T]>>::from) {
|
||||
debug reference => _1;
|
||||
let mut _4: *const [T];
|
||||
}
|
||||
scope 9 (inlined NonNull::<[T]>::cast::<T>) {
|
||||
debug self => _5;
|
||||
let mut _6: *const T;
|
||||
let mut _5: *const T;
|
||||
scope 10 (inlined NonNull::<[T]>::as_ptr) {
|
||||
debug self => _5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
scope 14 (inlined <std::slice::Iter<'_, T> as IntoIterator>::into_iter) {
|
||||
debug self => _13;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_3);
|
||||
StorageLive(_7);
|
||||
StorageLive(_4);
|
||||
StorageLive(_6);
|
||||
_3 = Len((*_1));
|
||||
StorageLive(_4);
|
||||
StorageLive(_5);
|
||||
_3 = Len((*_1));
|
||||
_4 = &raw const (*_1);
|
||||
_5 = NonNull::<[T]> { pointer: _4 };
|
||||
_6 = _4 as *const T (PtrToPtr);
|
||||
_7 = NonNull::<T> { pointer: _6 };
|
||||
StorageDead(_5);
|
||||
StorageLive(_11);
|
||||
StorageLive(_8);
|
||||
_8 = const <T as std::mem::SizedTypeProperties>::IS_ZST;
|
||||
switchInt(move _8) -> [0: bb1, otherwise: bb2];
|
||||
_5 = _4 as *const T (PtrToPtr);
|
||||
_6 = NonNull::<T> { pointer: _5 };
|
||||
StorageLive(_10);
|
||||
StorageLive(_7);
|
||||
_7 = const <T as std::mem::SizedTypeProperties>::IS_ZST;
|
||||
switchInt(move _7) -> [0: bb1, otherwise: bb2];
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageLive(_10);
|
||||
StorageLive(_9);
|
||||
_9 = _4 as *mut T (PtrToPtr);
|
||||
_10 = Offset(_9, _3);
|
||||
StorageLive(_8);
|
||||
_8 = _4 as *mut T (PtrToPtr);
|
||||
_9 = Offset(_8, _3);
|
||||
StorageDead(_8);
|
||||
_10 = move _9 as *const T (PointerCoercion(MutToConstPointer));
|
||||
StorageDead(_9);
|
||||
_11 = move _10 as *const T (PointerCoercion(MutToConstPointer));
|
||||
StorageDead(_10);
|
||||
goto -> bb3;
|
||||
}
|
||||
|
||||
bb2: {
|
||||
_11 = _3 as *const T (Transmute);
|
||||
_10 = _3 as *const T (Transmute);
|
||||
goto -> bb3;
|
||||
}
|
||||
|
||||
bb3: {
|
||||
StorageDead(_8);
|
||||
StorageLive(_12);
|
||||
_12 = _11;
|
||||
_13 = std::slice::Iter::<'_, T> { ptr: _7, end_or_len: move _12, _marker: const ZeroSized: PhantomData<&T> };
|
||||
StorageDead(_12);
|
||||
StorageDead(_11);
|
||||
StorageDead(_6);
|
||||
StorageDead(_4);
|
||||
StorageDead(_7);
|
||||
StorageLive(_11);
|
||||
_11 = _10;
|
||||
_12 = std::slice::Iter::<'_, T> { ptr: _6, end_or_len: move _11, _marker: const ZeroSized: PhantomData<&T> };
|
||||
StorageDead(_11);
|
||||
StorageDead(_10);
|
||||
StorageDead(_5);
|
||||
StorageDead(_4);
|
||||
StorageDead(_6);
|
||||
StorageDead(_3);
|
||||
StorageLive(_14);
|
||||
_14 = _13;
|
||||
StorageLive(_13);
|
||||
_13 = _12;
|
||||
goto -> bb4;
|
||||
}
|
||||
|
||||
bb4: {
|
||||
StorageLive(_16);
|
||||
StorageLive(_15);
|
||||
_15 = &mut _14;
|
||||
_16 = <std::slice::Iter<'_, T> as Iterator>::next(move _15) -> [return: bb5, unwind unreachable];
|
||||
StorageLive(_14);
|
||||
_14 = &mut _13;
|
||||
_15 = <std::slice::Iter<'_, T> as Iterator>::next(move _14) -> [return: bb5, unwind unreachable];
|
||||
}
|
||||
|
||||
bb5: {
|
||||
StorageDead(_15);
|
||||
_17 = discriminant(_16);
|
||||
switchInt(move _17) -> [0: bb6, 1: bb8, otherwise: bb10];
|
||||
StorageDead(_14);
|
||||
_16 = discriminant(_15);
|
||||
switchInt(move _16) -> [0: bb6, 1: bb8, otherwise: bb10];
|
||||
}
|
||||
|
||||
bb6: {
|
||||
StorageDead(_16);
|
||||
StorageDead(_14);
|
||||
StorageDead(_15);
|
||||
StorageDead(_13);
|
||||
drop(_2) -> [return: bb7, unwind unreachable];
|
||||
}
|
||||
|
||||
@ -141,18 +124,18 @@ fn forward_loop(_1: &[T], _2: impl Fn(&T)) -> () {
|
||||
}
|
||||
|
||||
bb8: {
|
||||
_18 = ((_16 as Some).0: &T);
|
||||
_17 = ((_15 as Some).0: &T);
|
||||
StorageLive(_18);
|
||||
_18 = &_2;
|
||||
StorageLive(_19);
|
||||
_19 = &_2;
|
||||
StorageLive(_20);
|
||||
_20 = (_18,);
|
||||
_21 = <impl Fn(&T) as Fn<(&T,)>>::call(move _19, move _20) -> [return: bb9, unwind unreachable];
|
||||
_19 = (_17,);
|
||||
_20 = <impl Fn(&T) as Fn<(&T,)>>::call(move _18, move _19) -> [return: bb9, unwind unreachable];
|
||||
}
|
||||
|
||||
bb9: {
|
||||
StorageDead(_20);
|
||||
StorageDead(_19);
|
||||
StorageDead(_16);
|
||||
StorageDead(_18);
|
||||
StorageDead(_15);
|
||||
goto -> bb4;
|
||||
}
|
||||
|
||||
|
@ -4,135 +4,118 @@ fn forward_loop(_1: &[T], _2: impl Fn(&T)) -> () {
|
||||
debug slice => _1;
|
||||
debug f => _2;
|
||||
let mut _0: ();
|
||||
let mut _12: std::slice::Iter<'_, T>;
|
||||
let mut _13: std::slice::Iter<'_, T>;
|
||||
let mut _14: std::slice::Iter<'_, T>;
|
||||
let mut _15: &mut std::slice::Iter<'_, T>;
|
||||
let mut _16: std::option::Option<&T>;
|
||||
let mut _17: isize;
|
||||
let mut _19: &impl Fn(&T);
|
||||
let mut _20: (&T,);
|
||||
let _21: ();
|
||||
let mut _14: &mut std::slice::Iter<'_, T>;
|
||||
let mut _15: std::option::Option<&T>;
|
||||
let mut _16: isize;
|
||||
let mut _18: &impl Fn(&T);
|
||||
let mut _19: (&T,);
|
||||
let _20: ();
|
||||
scope 1 {
|
||||
debug iter => _14;
|
||||
let _18: &T;
|
||||
debug iter => _13;
|
||||
let _17: &T;
|
||||
scope 2 {
|
||||
debug x => _18;
|
||||
debug x => _17;
|
||||
}
|
||||
}
|
||||
scope 3 (inlined core::slice::<impl [T]>::iter) {
|
||||
debug self => _1;
|
||||
scope 4 (inlined std::slice::Iter::<'_, T>::new) {
|
||||
debug slice => _1;
|
||||
let _3: usize;
|
||||
let mut _5: std::ptr::NonNull<[T]>;
|
||||
let mut _8: bool;
|
||||
let mut _7: bool;
|
||||
let mut _8: *mut T;
|
||||
let mut _9: *mut T;
|
||||
let mut _10: *mut T;
|
||||
let mut _12: *const T;
|
||||
let mut _11: *const T;
|
||||
scope 5 {
|
||||
debug len => _3;
|
||||
let _7: std::ptr::NonNull<T>;
|
||||
let _6: std::ptr::NonNull<T>;
|
||||
scope 6 {
|
||||
debug ptr => _7;
|
||||
let _11: *const T;
|
||||
let _10: *const T;
|
||||
scope 7 {
|
||||
debug end_or_len => _11;
|
||||
}
|
||||
scope 11 (inlined without_provenance::<T>) {
|
||||
debug addr => _3;
|
||||
}
|
||||
scope 12 (inlined NonNull::<T>::as_ptr) {
|
||||
debug self => _7;
|
||||
}
|
||||
scope 13 (inlined std::ptr::mut_ptr::<impl *mut T>::add) {
|
||||
debug self => _9;
|
||||
debug count => _3;
|
||||
}
|
||||
}
|
||||
scope 8 (inlined <NonNull<[T]> as From<&[T]>>::from) {
|
||||
debug reference => _1;
|
||||
let mut _4: *const [T];
|
||||
}
|
||||
scope 9 (inlined NonNull::<[T]>::cast::<T>) {
|
||||
debug self => _5;
|
||||
let mut _6: *const T;
|
||||
let mut _5: *const T;
|
||||
scope 10 (inlined NonNull::<[T]>::as_ptr) {
|
||||
debug self => _5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
scope 14 (inlined <std::slice::Iter<'_, T> as IntoIterator>::into_iter) {
|
||||
debug self => _13;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_3);
|
||||
StorageLive(_7);
|
||||
StorageLive(_4);
|
||||
StorageLive(_6);
|
||||
_3 = Len((*_1));
|
||||
StorageLive(_4);
|
||||
StorageLive(_5);
|
||||
_3 = Len((*_1));
|
||||
_4 = &raw const (*_1);
|
||||
_5 = NonNull::<[T]> { pointer: _4 };
|
||||
_6 = _4 as *const T (PtrToPtr);
|
||||
_7 = NonNull::<T> { pointer: _6 };
|
||||
StorageDead(_5);
|
||||
StorageLive(_11);
|
||||
StorageLive(_8);
|
||||
_8 = const <T as std::mem::SizedTypeProperties>::IS_ZST;
|
||||
switchInt(move _8) -> [0: bb1, otherwise: bb2];
|
||||
_5 = _4 as *const T (PtrToPtr);
|
||||
_6 = NonNull::<T> { pointer: _5 };
|
||||
StorageLive(_10);
|
||||
StorageLive(_7);
|
||||
_7 = const <T as std::mem::SizedTypeProperties>::IS_ZST;
|
||||
switchInt(move _7) -> [0: bb1, otherwise: bb2];
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageLive(_10);
|
||||
StorageLive(_9);
|
||||
_9 = _4 as *mut T (PtrToPtr);
|
||||
_10 = Offset(_9, _3);
|
||||
StorageLive(_8);
|
||||
_8 = _4 as *mut T (PtrToPtr);
|
||||
_9 = Offset(_8, _3);
|
||||
StorageDead(_8);
|
||||
_10 = move _9 as *const T (PointerCoercion(MutToConstPointer));
|
||||
StorageDead(_9);
|
||||
_11 = move _10 as *const T (PointerCoercion(MutToConstPointer));
|
||||
StorageDead(_10);
|
||||
goto -> bb3;
|
||||
}
|
||||
|
||||
bb2: {
|
||||
_11 = _3 as *const T (Transmute);
|
||||
_10 = _3 as *const T (Transmute);
|
||||
goto -> bb3;
|
||||
}
|
||||
|
||||
bb3: {
|
||||
StorageDead(_8);
|
||||
StorageLive(_12);
|
||||
_12 = _11;
|
||||
_13 = std::slice::Iter::<'_, T> { ptr: _7, end_or_len: move _12, _marker: const ZeroSized: PhantomData<&T> };
|
||||
StorageDead(_12);
|
||||
StorageDead(_11);
|
||||
StorageDead(_6);
|
||||
StorageDead(_4);
|
||||
StorageDead(_7);
|
||||
StorageLive(_11);
|
||||
_11 = _10;
|
||||
_12 = std::slice::Iter::<'_, T> { ptr: _6, end_or_len: move _11, _marker: const ZeroSized: PhantomData<&T> };
|
||||
StorageDead(_11);
|
||||
StorageDead(_10);
|
||||
StorageDead(_5);
|
||||
StorageDead(_4);
|
||||
StorageDead(_6);
|
||||
StorageDead(_3);
|
||||
StorageLive(_14);
|
||||
_14 = _13;
|
||||
StorageLive(_13);
|
||||
_13 = _12;
|
||||
goto -> bb4;
|
||||
}
|
||||
|
||||
bb4: {
|
||||
StorageLive(_16);
|
||||
StorageLive(_15);
|
||||
_15 = &mut _14;
|
||||
_16 = <std::slice::Iter<'_, T> as Iterator>::next(move _15) -> [return: bb5, unwind: bb11];
|
||||
StorageLive(_14);
|
||||
_14 = &mut _13;
|
||||
_15 = <std::slice::Iter<'_, T> as Iterator>::next(move _14) -> [return: bb5, unwind: bb11];
|
||||
}
|
||||
|
||||
bb5: {
|
||||
StorageDead(_15);
|
||||
_17 = discriminant(_16);
|
||||
switchInt(move _17) -> [0: bb6, 1: bb8, otherwise: bb10];
|
||||
StorageDead(_14);
|
||||
_16 = discriminant(_15);
|
||||
switchInt(move _16) -> [0: bb6, 1: bb8, otherwise: bb10];
|
||||
}
|
||||
|
||||
bb6: {
|
||||
StorageDead(_16);
|
||||
StorageDead(_14);
|
||||
StorageDead(_15);
|
||||
StorageDead(_13);
|
||||
drop(_2) -> [return: bb7, unwind continue];
|
||||
}
|
||||
|
||||
@ -141,18 +124,18 @@ fn forward_loop(_1: &[T], _2: impl Fn(&T)) -> () {
|
||||
}
|
||||
|
||||
bb8: {
|
||||
_18 = ((_16 as Some).0: &T);
|
||||
_17 = ((_15 as Some).0: &T);
|
||||
StorageLive(_18);
|
||||
_18 = &_2;
|
||||
StorageLive(_19);
|
||||
_19 = &_2;
|
||||
StorageLive(_20);
|
||||
_20 = (_18,);
|
||||
_21 = <impl Fn(&T) as Fn<(&T,)>>::call(move _19, move _20) -> [return: bb9, unwind: bb11];
|
||||
_19 = (_17,);
|
||||
_20 = <impl Fn(&T) as Fn<(&T,)>>::call(move _18, move _19) -> [return: bb9, unwind: bb11];
|
||||
}
|
||||
|
||||
bb9: {
|
||||
StorageDead(_20);
|
||||
StorageDead(_19);
|
||||
StorageDead(_16);
|
||||
StorageDead(_18);
|
||||
StorageDead(_15);
|
||||
goto -> bb4;
|
||||
}
|
||||
|
||||
|
@ -5,86 +5,63 @@ fn range_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
|
||||
debug f => _2;
|
||||
let mut _0: ();
|
||||
let mut _3: usize;
|
||||
let mut _4: std::ops::Range<usize>;
|
||||
let mut _5: std::ops::Range<usize>;
|
||||
let mut _6: &mut std::ops::Range<usize>;
|
||||
let mut _14: std::option::Option<usize>;
|
||||
let mut _16: usize;
|
||||
let mut _17: bool;
|
||||
let mut _19: &impl Fn(usize, &T);
|
||||
let mut _20: (usize, &T);
|
||||
let _21: ();
|
||||
let mut _4: usize;
|
||||
let mut _9: std::option::Option<usize>;
|
||||
let mut _11: usize;
|
||||
let mut _12: bool;
|
||||
let mut _14: &impl Fn(usize, &T);
|
||||
let mut _15: (usize, &T);
|
||||
let _16: ();
|
||||
scope 1 {
|
||||
debug iter => _5;
|
||||
let _15: usize;
|
||||
debug ((iter: std::ops::Range<usize>).0: usize) => _4;
|
||||
debug ((iter: std::ops::Range<usize>).1: usize) => _3;
|
||||
let _10: usize;
|
||||
scope 2 {
|
||||
debug i => _15;
|
||||
let _18: &T;
|
||||
debug i => _10;
|
||||
let _13: &T;
|
||||
scope 3 {
|
||||
debug x => _18;
|
||||
debug x => _13;
|
||||
}
|
||||
}
|
||||
scope 5 (inlined iter::range::<impl Iterator for std::ops::Range<usize>>::next) {
|
||||
debug self => _6;
|
||||
scope 6 (inlined <std::ops::Range<usize> as iter::range::RangeIteratorImpl>::spec_next) {
|
||||
debug self => _6;
|
||||
let mut _7: &usize;
|
||||
let mut _8: &usize;
|
||||
let mut _11: bool;
|
||||
let _12: usize;
|
||||
let mut _13: usize;
|
||||
let mut _6: bool;
|
||||
let _7: usize;
|
||||
let mut _8: usize;
|
||||
scope 7 {
|
||||
debug old => _12;
|
||||
}
|
||||
scope 8 (inlined std::cmp::impls::<impl PartialOrd for usize>::lt) {
|
||||
debug self => _7;
|
||||
debug other => _8;
|
||||
let mut _9: usize;
|
||||
let mut _10: usize;
|
||||
let mut _5: usize;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
scope 4 (inlined <std::ops::Range<usize> as IntoIterator>::into_iter) {
|
||||
debug self => _4;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_3);
|
||||
_3 = Len((*_1));
|
||||
_4 = std::ops::Range::<usize> { start: const 0_usize, end: move _3 };
|
||||
StorageDead(_3);
|
||||
StorageLive(_5);
|
||||
_5 = _4;
|
||||
StorageLive(_4);
|
||||
_4 = const 0_usize;
|
||||
goto -> bb1;
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageLive(_14);
|
||||
_6 = &mut _5;
|
||||
StorageLive(_12);
|
||||
StorageLive(_11);
|
||||
StorageLive(_7);
|
||||
_7 = &(_5.0: usize);
|
||||
StorageLive(_8);
|
||||
_8 = &(_5.1: usize);
|
||||
StorageLive(_9);
|
||||
_9 = (_5.0: usize);
|
||||
StorageLive(_10);
|
||||
_10 = (_5.1: usize);
|
||||
_11 = Lt(move _9, move _10);
|
||||
StorageDead(_10);
|
||||
StorageDead(_9);
|
||||
switchInt(move _11) -> [0: bb2, otherwise: bb4];
|
||||
StorageLive(_7);
|
||||
StorageLive(_6);
|
||||
StorageLive(_5);
|
||||
_5 = _4;
|
||||
_6 = Lt(move _5, _3);
|
||||
StorageDead(_5);
|
||||
switchInt(move _6) -> [0: bb2, otherwise: bb4];
|
||||
}
|
||||
|
||||
bb2: {
|
||||
StorageDead(_8);
|
||||
StorageDead(_6);
|
||||
StorageDead(_7);
|
||||
StorageDead(_11);
|
||||
StorageDead(_12);
|
||||
StorageDead(_14);
|
||||
StorageDead(_5);
|
||||
StorageDead(_9);
|
||||
StorageDead(_4);
|
||||
drop(_2) -> [return: bb3, unwind unreachable];
|
||||
}
|
||||
|
||||
@ -93,38 +70,36 @@ fn range_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
|
||||
}
|
||||
|
||||
bb4: {
|
||||
StorageDead(_8);
|
||||
StorageDead(_7);
|
||||
_12 = (_5.0: usize);
|
||||
StorageLive(_13);
|
||||
_13 = <usize as Step>::forward_unchecked(_12, const 1_usize) -> [return: bb5, unwind unreachable];
|
||||
_7 = _4;
|
||||
StorageLive(_8);
|
||||
_8 = <usize as Step>::forward_unchecked(_7, const 1_usize) -> [return: bb5, unwind unreachable];
|
||||
}
|
||||
|
||||
bb5: {
|
||||
(_5.0: usize) = move _13;
|
||||
StorageDead(_13);
|
||||
_14 = Option::<usize>::Some(_12);
|
||||
StorageDead(_11);
|
||||
StorageDead(_12);
|
||||
_15 = ((_14 as Some).0: usize);
|
||||
_16 = Len((*_1));
|
||||
_17 = Lt(_15, _16);
|
||||
assert(move _17, "index out of bounds: the length is {} but the index is {}", move _16, _15) -> [success: bb6, unwind unreachable];
|
||||
_4 = move _8;
|
||||
StorageDead(_8);
|
||||
_9 = Option::<usize>::Some(_7);
|
||||
StorageDead(_6);
|
||||
StorageDead(_7);
|
||||
_10 = ((_9 as Some).0: usize);
|
||||
_11 = Len((*_1));
|
||||
_12 = Lt(_10, _11);
|
||||
assert(move _12, "index out of bounds: the length is {} but the index is {}", move _11, _10) -> [success: bb6, unwind unreachable];
|
||||
}
|
||||
|
||||
bb6: {
|
||||
_18 = &(*_1)[_15];
|
||||
StorageLive(_19);
|
||||
_19 = &_2;
|
||||
StorageLive(_20);
|
||||
_20 = (_15, _18);
|
||||
_21 = <impl Fn(usize, &T) as Fn<(usize, &T)>>::call(move _19, move _20) -> [return: bb7, unwind unreachable];
|
||||
_13 = &(*_1)[_10];
|
||||
StorageLive(_14);
|
||||
_14 = &_2;
|
||||
StorageLive(_15);
|
||||
_15 = (_10, _13);
|
||||
_16 = <impl Fn(usize, &T) as Fn<(usize, &T)>>::call(move _14, move _15) -> [return: bb7, unwind unreachable];
|
||||
}
|
||||
|
||||
bb7: {
|
||||
StorageDead(_20);
|
||||
StorageDead(_19);
|
||||
StorageDead(_15);
|
||||
StorageDead(_14);
|
||||
StorageDead(_9);
|
||||
goto -> bb1;
|
||||
}
|
||||
}
|
||||
|
@ -5,86 +5,63 @@ fn range_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
|
||||
debug f => _2;
|
||||
let mut _0: ();
|
||||
let mut _3: usize;
|
||||
let mut _4: std::ops::Range<usize>;
|
||||
let mut _5: std::ops::Range<usize>;
|
||||
let mut _6: &mut std::ops::Range<usize>;
|
||||
let mut _14: std::option::Option<usize>;
|
||||
let mut _16: usize;
|
||||
let mut _17: bool;
|
||||
let mut _19: &impl Fn(usize, &T);
|
||||
let mut _20: (usize, &T);
|
||||
let _21: ();
|
||||
let mut _4: usize;
|
||||
let mut _9: std::option::Option<usize>;
|
||||
let mut _11: usize;
|
||||
let mut _12: bool;
|
||||
let mut _14: &impl Fn(usize, &T);
|
||||
let mut _15: (usize, &T);
|
||||
let _16: ();
|
||||
scope 1 {
|
||||
debug iter => _5;
|
||||
let _15: usize;
|
||||
debug ((iter: std::ops::Range<usize>).0: usize) => _4;
|
||||
debug ((iter: std::ops::Range<usize>).1: usize) => _3;
|
||||
let _10: usize;
|
||||
scope 2 {
|
||||
debug i => _15;
|
||||
let _18: &T;
|
||||
debug i => _10;
|
||||
let _13: &T;
|
||||
scope 3 {
|
||||
debug x => _18;
|
||||
debug x => _13;
|
||||
}
|
||||
}
|
||||
scope 5 (inlined iter::range::<impl Iterator for std::ops::Range<usize>>::next) {
|
||||
debug self => _6;
|
||||
scope 6 (inlined <std::ops::Range<usize> as iter::range::RangeIteratorImpl>::spec_next) {
|
||||
debug self => _6;
|
||||
let mut _7: &usize;
|
||||
let mut _8: &usize;
|
||||
let mut _11: bool;
|
||||
let _12: usize;
|
||||
let mut _13: usize;
|
||||
let mut _6: bool;
|
||||
let _7: usize;
|
||||
let mut _8: usize;
|
||||
scope 7 {
|
||||
debug old => _12;
|
||||
}
|
||||
scope 8 (inlined std::cmp::impls::<impl PartialOrd for usize>::lt) {
|
||||
debug self => _7;
|
||||
debug other => _8;
|
||||
let mut _9: usize;
|
||||
let mut _10: usize;
|
||||
let mut _5: usize;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
scope 4 (inlined <std::ops::Range<usize> as IntoIterator>::into_iter) {
|
||||
debug self => _4;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_3);
|
||||
_3 = Len((*_1));
|
||||
_4 = std::ops::Range::<usize> { start: const 0_usize, end: move _3 };
|
||||
StorageDead(_3);
|
||||
StorageLive(_5);
|
||||
_5 = _4;
|
||||
StorageLive(_4);
|
||||
_4 = const 0_usize;
|
||||
goto -> bb1;
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageLive(_14);
|
||||
_6 = &mut _5;
|
||||
StorageLive(_12);
|
||||
StorageLive(_11);
|
||||
StorageLive(_7);
|
||||
_7 = &(_5.0: usize);
|
||||
StorageLive(_8);
|
||||
_8 = &(_5.1: usize);
|
||||
StorageLive(_9);
|
||||
_9 = (_5.0: usize);
|
||||
StorageLive(_10);
|
||||
_10 = (_5.1: usize);
|
||||
_11 = Lt(move _9, move _10);
|
||||
StorageDead(_10);
|
||||
StorageDead(_9);
|
||||
switchInt(move _11) -> [0: bb2, otherwise: bb4];
|
||||
StorageLive(_7);
|
||||
StorageLive(_6);
|
||||
StorageLive(_5);
|
||||
_5 = _4;
|
||||
_6 = Lt(move _5, _3);
|
||||
StorageDead(_5);
|
||||
switchInt(move _6) -> [0: bb2, otherwise: bb4];
|
||||
}
|
||||
|
||||
bb2: {
|
||||
StorageDead(_8);
|
||||
StorageDead(_6);
|
||||
StorageDead(_7);
|
||||
StorageDead(_11);
|
||||
StorageDead(_12);
|
||||
StorageDead(_14);
|
||||
StorageDead(_5);
|
||||
StorageDead(_9);
|
||||
StorageDead(_4);
|
||||
drop(_2) -> [return: bb3, unwind continue];
|
||||
}
|
||||
|
||||
@ -93,38 +70,36 @@ fn range_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
|
||||
}
|
||||
|
||||
bb4: {
|
||||
StorageDead(_8);
|
||||
StorageDead(_7);
|
||||
_12 = (_5.0: usize);
|
||||
StorageLive(_13);
|
||||
_13 = <usize as Step>::forward_unchecked(_12, const 1_usize) -> [return: bb5, unwind: bb8];
|
||||
_7 = _4;
|
||||
StorageLive(_8);
|
||||
_8 = <usize as Step>::forward_unchecked(_7, const 1_usize) -> [return: bb5, unwind: bb8];
|
||||
}
|
||||
|
||||
bb5: {
|
||||
(_5.0: usize) = move _13;
|
||||
StorageDead(_13);
|
||||
_14 = Option::<usize>::Some(_12);
|
||||
StorageDead(_11);
|
||||
StorageDead(_12);
|
||||
_15 = ((_14 as Some).0: usize);
|
||||
_16 = Len((*_1));
|
||||
_17 = Lt(_15, _16);
|
||||
assert(move _17, "index out of bounds: the length is {} but the index is {}", move _16, _15) -> [success: bb6, unwind: bb8];
|
||||
_4 = move _8;
|
||||
StorageDead(_8);
|
||||
_9 = Option::<usize>::Some(_7);
|
||||
StorageDead(_6);
|
||||
StorageDead(_7);
|
||||
_10 = ((_9 as Some).0: usize);
|
||||
_11 = Len((*_1));
|
||||
_12 = Lt(_10, _11);
|
||||
assert(move _12, "index out of bounds: the length is {} but the index is {}", move _11, _10) -> [success: bb6, unwind: bb8];
|
||||
}
|
||||
|
||||
bb6: {
|
||||
_18 = &(*_1)[_15];
|
||||
StorageLive(_19);
|
||||
_19 = &_2;
|
||||
StorageLive(_20);
|
||||
_20 = (_15, _18);
|
||||
_21 = <impl Fn(usize, &T) as Fn<(usize, &T)>>::call(move _19, move _20) -> [return: bb7, unwind: bb8];
|
||||
_13 = &(*_1)[_10];
|
||||
StorageLive(_14);
|
||||
_14 = &_2;
|
||||
StorageLive(_15);
|
||||
_15 = (_10, _13);
|
||||
_16 = <impl Fn(usize, &T) as Fn<(usize, &T)>>::call(move _14, move _15) -> [return: bb7, unwind: bb8];
|
||||
}
|
||||
|
||||
bb7: {
|
||||
StorageDead(_20);
|
||||
StorageDead(_19);
|
||||
StorageDead(_15);
|
||||
StorageDead(_14);
|
||||
StorageDead(_9);
|
||||
goto -> bb1;
|
||||
}
|
||||
|
||||
|
@ -4,150 +4,128 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
|
||||
debug slice => _1;
|
||||
debug f => _2;
|
||||
let mut _0: ();
|
||||
let mut _13: std::slice::Iter<'_, T>;
|
||||
let mut _12: std::slice::Iter<'_, T>;
|
||||
let mut _13: std::iter::Rev<std::slice::Iter<'_, T>>;
|
||||
let mut _14: std::iter::Rev<std::slice::Iter<'_, T>>;
|
||||
let mut _15: std::iter::Rev<std::slice::Iter<'_, T>>;
|
||||
let mut _16: &mut std::iter::Rev<std::slice::Iter<'_, T>>;
|
||||
let mut _18: std::option::Option<&T>;
|
||||
let mut _19: isize;
|
||||
let mut _21: &impl Fn(&T);
|
||||
let mut _22: (&T,);
|
||||
let _23: ();
|
||||
let mut _16: std::option::Option<&T>;
|
||||
let mut _17: isize;
|
||||
let mut _19: &impl Fn(&T);
|
||||
let mut _20: (&T,);
|
||||
let _21: ();
|
||||
scope 1 {
|
||||
debug iter => _15;
|
||||
let _20: &T;
|
||||
debug iter => _14;
|
||||
let _18: &T;
|
||||
scope 2 {
|
||||
debug x => _20;
|
||||
debug x => _18;
|
||||
}
|
||||
scope 17 (inlined <Rev<std::slice::Iter<'_, T>> as Iterator>::next) {
|
||||
debug self => _16;
|
||||
let mut _17: &mut std::slice::Iter<'_, T>;
|
||||
let mut _15: &mut std::slice::Iter<'_, T>;
|
||||
}
|
||||
}
|
||||
scope 3 (inlined core::slice::<impl [T]>::iter) {
|
||||
debug self => _1;
|
||||
scope 4 (inlined std::slice::Iter::<'_, T>::new) {
|
||||
debug slice => _1;
|
||||
let _3: usize;
|
||||
let mut _5: std::ptr::NonNull<[T]>;
|
||||
let mut _8: bool;
|
||||
let mut _7: bool;
|
||||
let mut _8: *mut T;
|
||||
let mut _9: *mut T;
|
||||
let mut _10: *mut T;
|
||||
let mut _12: *const T;
|
||||
let mut _11: *const T;
|
||||
scope 5 {
|
||||
debug len => _3;
|
||||
let _7: std::ptr::NonNull<T>;
|
||||
let _6: std::ptr::NonNull<T>;
|
||||
scope 6 {
|
||||
debug ptr => _7;
|
||||
let _11: *const T;
|
||||
let _10: *const T;
|
||||
scope 7 {
|
||||
debug end_or_len => _11;
|
||||
}
|
||||
scope 11 (inlined without_provenance::<T>) {
|
||||
debug addr => _3;
|
||||
}
|
||||
scope 12 (inlined NonNull::<T>::as_ptr) {
|
||||
debug self => _7;
|
||||
}
|
||||
scope 13 (inlined std::ptr::mut_ptr::<impl *mut T>::add) {
|
||||
debug self => _9;
|
||||
debug count => _3;
|
||||
}
|
||||
}
|
||||
scope 8 (inlined <NonNull<[T]> as From<&[T]>>::from) {
|
||||
debug reference => _1;
|
||||
let mut _4: *const [T];
|
||||
}
|
||||
scope 9 (inlined NonNull::<[T]>::cast::<T>) {
|
||||
debug self => _5;
|
||||
let mut _6: *const T;
|
||||
let mut _5: *const T;
|
||||
scope 10 (inlined NonNull::<[T]>::as_ptr) {
|
||||
debug self => _5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
scope 14 (inlined <std::slice::Iter<'_, T> as Iterator>::rev) {
|
||||
debug self => _13;
|
||||
scope 15 (inlined Rev::<std::slice::Iter<'_, T>>::new) {
|
||||
debug iter => _13;
|
||||
}
|
||||
}
|
||||
scope 16 (inlined <Rev<std::slice::Iter<'_, T>> as IntoIterator>::into_iter) {
|
||||
debug self => _14;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_13);
|
||||
StorageLive(_12);
|
||||
StorageLive(_3);
|
||||
StorageLive(_7);
|
||||
StorageLive(_4);
|
||||
StorageLive(_6);
|
||||
_3 = Len((*_1));
|
||||
StorageLive(_4);
|
||||
StorageLive(_5);
|
||||
_3 = Len((*_1));
|
||||
_4 = &raw const (*_1);
|
||||
_5 = NonNull::<[T]> { pointer: _4 };
|
||||
_6 = _4 as *const T (PtrToPtr);
|
||||
_7 = NonNull::<T> { pointer: _6 };
|
||||
StorageDead(_5);
|
||||
StorageLive(_11);
|
||||
StorageLive(_8);
|
||||
_8 = const <T as std::mem::SizedTypeProperties>::IS_ZST;
|
||||
switchInt(move _8) -> [0: bb1, otherwise: bb2];
|
||||
_5 = _4 as *const T (PtrToPtr);
|
||||
_6 = NonNull::<T> { pointer: _5 };
|
||||
StorageLive(_10);
|
||||
StorageLive(_7);
|
||||
_7 = const <T as std::mem::SizedTypeProperties>::IS_ZST;
|
||||
switchInt(move _7) -> [0: bb1, otherwise: bb2];
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageLive(_10);
|
||||
StorageLive(_9);
|
||||
_9 = _4 as *mut T (PtrToPtr);
|
||||
_10 = Offset(_9, _3);
|
||||
StorageLive(_8);
|
||||
_8 = _4 as *mut T (PtrToPtr);
|
||||
_9 = Offset(_8, _3);
|
||||
StorageDead(_8);
|
||||
_10 = move _9 as *const T (PointerCoercion(MutToConstPointer));
|
||||
StorageDead(_9);
|
||||
_11 = move _10 as *const T (PointerCoercion(MutToConstPointer));
|
||||
StorageDead(_10);
|
||||
goto -> bb3;
|
||||
}
|
||||
|
||||
bb2: {
|
||||
_11 = _3 as *const T (Transmute);
|
||||
_10 = _3 as *const T (Transmute);
|
||||
goto -> bb3;
|
||||
}
|
||||
|
||||
bb3: {
|
||||
StorageDead(_8);
|
||||
StorageLive(_12);
|
||||
_12 = _11;
|
||||
_13 = std::slice::Iter::<'_, T> { ptr: _7, end_or_len: move _12, _marker: const ZeroSized: PhantomData<&T> };
|
||||
StorageDead(_12);
|
||||
StorageDead(_11);
|
||||
StorageDead(_6);
|
||||
StorageDead(_4);
|
||||
StorageDead(_7);
|
||||
StorageLive(_11);
|
||||
_11 = _10;
|
||||
_12 = std::slice::Iter::<'_, T> { ptr: _6, end_or_len: move _11, _marker: const ZeroSized: PhantomData<&T> };
|
||||
StorageDead(_11);
|
||||
StorageDead(_10);
|
||||
StorageDead(_5);
|
||||
StorageDead(_4);
|
||||
StorageDead(_6);
|
||||
StorageDead(_3);
|
||||
_14 = Rev::<std::slice::Iter<'_, T>> { iter: _13 };
|
||||
StorageDead(_13);
|
||||
StorageLive(_15);
|
||||
_15 = _14;
|
||||
_13 = Rev::<std::slice::Iter<'_, T>> { iter: _12 };
|
||||
StorageDead(_12);
|
||||
StorageLive(_14);
|
||||
_14 = _13;
|
||||
goto -> bb4;
|
||||
}
|
||||
|
||||
bb4: {
|
||||
StorageLive(_18);
|
||||
_16 = &mut _15;
|
||||
StorageLive(_17);
|
||||
_17 = &mut (_15.0: std::slice::Iter<'_, T>);
|
||||
_18 = <std::slice::Iter<'_, T> as DoubleEndedIterator>::next_back(move _17) -> [return: bb5, unwind unreachable];
|
||||
StorageLive(_16);
|
||||
StorageLive(_15);
|
||||
_15 = &mut (_14.0: std::slice::Iter<'_, T>);
|
||||
_16 = <std::slice::Iter<'_, T> as DoubleEndedIterator>::next_back(move _15) -> [return: bb5, unwind unreachable];
|
||||
}
|
||||
|
||||
bb5: {
|
||||
StorageDead(_17);
|
||||
_19 = discriminant(_18);
|
||||
switchInt(move _19) -> [0: bb6, 1: bb8, otherwise: bb10];
|
||||
StorageDead(_15);
|
||||
_17 = discriminant(_16);
|
||||
switchInt(move _17) -> [0: bb6, 1: bb8, otherwise: bb10];
|
||||
}
|
||||
|
||||
bb6: {
|
||||
StorageDead(_18);
|
||||
StorageDead(_15);
|
||||
StorageDead(_16);
|
||||
StorageDead(_14);
|
||||
drop(_2) -> [return: bb7, unwind unreachable];
|
||||
}
|
||||
|
||||
@ -156,18 +134,18 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
|
||||
}
|
||||
|
||||
bb8: {
|
||||
_20 = ((_18 as Some).0: &T);
|
||||
StorageLive(_21);
|
||||
_21 = &_2;
|
||||
StorageLive(_22);
|
||||
_22 = (_20,);
|
||||
_23 = <impl Fn(&T) as Fn<(&T,)>>::call(move _21, move _22) -> [return: bb9, unwind unreachable];
|
||||
_18 = ((_16 as Some).0: &T);
|
||||
StorageLive(_19);
|
||||
_19 = &_2;
|
||||
StorageLive(_20);
|
||||
_20 = (_18,);
|
||||
_21 = <impl Fn(&T) as Fn<(&T,)>>::call(move _19, move _20) -> [return: bb9, unwind unreachable];
|
||||
}
|
||||
|
||||
bb9: {
|
||||
StorageDead(_22);
|
||||
StorageDead(_21);
|
||||
StorageDead(_18);
|
||||
StorageDead(_20);
|
||||
StorageDead(_19);
|
||||
StorageDead(_16);
|
||||
goto -> bb4;
|
||||
}
|
||||
|
||||
|
@ -4,150 +4,128 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
|
||||
debug slice => _1;
|
||||
debug f => _2;
|
||||
let mut _0: ();
|
||||
let mut _13: std::slice::Iter<'_, T>;
|
||||
let mut _12: std::slice::Iter<'_, T>;
|
||||
let mut _13: std::iter::Rev<std::slice::Iter<'_, T>>;
|
||||
let mut _14: std::iter::Rev<std::slice::Iter<'_, T>>;
|
||||
let mut _15: std::iter::Rev<std::slice::Iter<'_, T>>;
|
||||
let mut _16: &mut std::iter::Rev<std::slice::Iter<'_, T>>;
|
||||
let mut _18: std::option::Option<&T>;
|
||||
let mut _19: isize;
|
||||
let mut _21: &impl Fn(&T);
|
||||
let mut _22: (&T,);
|
||||
let _23: ();
|
||||
let mut _16: std::option::Option<&T>;
|
||||
let mut _17: isize;
|
||||
let mut _19: &impl Fn(&T);
|
||||
let mut _20: (&T,);
|
||||
let _21: ();
|
||||
scope 1 {
|
||||
debug iter => _15;
|
||||
let _20: &T;
|
||||
debug iter => _14;
|
||||
let _18: &T;
|
||||
scope 2 {
|
||||
debug x => _20;
|
||||
debug x => _18;
|
||||
}
|
||||
scope 17 (inlined <Rev<std::slice::Iter<'_, T>> as Iterator>::next) {
|
||||
debug self => _16;
|
||||
let mut _17: &mut std::slice::Iter<'_, T>;
|
||||
let mut _15: &mut std::slice::Iter<'_, T>;
|
||||
}
|
||||
}
|
||||
scope 3 (inlined core::slice::<impl [T]>::iter) {
|
||||
debug self => _1;
|
||||
scope 4 (inlined std::slice::Iter::<'_, T>::new) {
|
||||
debug slice => _1;
|
||||
let _3: usize;
|
||||
let mut _5: std::ptr::NonNull<[T]>;
|
||||
let mut _8: bool;
|
||||
let mut _7: bool;
|
||||
let mut _8: *mut T;
|
||||
let mut _9: *mut T;
|
||||
let mut _10: *mut T;
|
||||
let mut _12: *const T;
|
||||
let mut _11: *const T;
|
||||
scope 5 {
|
||||
debug len => _3;
|
||||
let _7: std::ptr::NonNull<T>;
|
||||
let _6: std::ptr::NonNull<T>;
|
||||
scope 6 {
|
||||
debug ptr => _7;
|
||||
let _11: *const T;
|
||||
let _10: *const T;
|
||||
scope 7 {
|
||||
debug end_or_len => _11;
|
||||
}
|
||||
scope 11 (inlined without_provenance::<T>) {
|
||||
debug addr => _3;
|
||||
}
|
||||
scope 12 (inlined NonNull::<T>::as_ptr) {
|
||||
debug self => _7;
|
||||
}
|
||||
scope 13 (inlined std::ptr::mut_ptr::<impl *mut T>::add) {
|
||||
debug self => _9;
|
||||
debug count => _3;
|
||||
}
|
||||
}
|
||||
scope 8 (inlined <NonNull<[T]> as From<&[T]>>::from) {
|
||||
debug reference => _1;
|
||||
let mut _4: *const [T];
|
||||
}
|
||||
scope 9 (inlined NonNull::<[T]>::cast::<T>) {
|
||||
debug self => _5;
|
||||
let mut _6: *const T;
|
||||
let mut _5: *const T;
|
||||
scope 10 (inlined NonNull::<[T]>::as_ptr) {
|
||||
debug self => _5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
scope 14 (inlined <std::slice::Iter<'_, T> as Iterator>::rev) {
|
||||
debug self => _13;
|
||||
scope 15 (inlined Rev::<std::slice::Iter<'_, T>>::new) {
|
||||
debug iter => _13;
|
||||
}
|
||||
}
|
||||
scope 16 (inlined <Rev<std::slice::Iter<'_, T>> as IntoIterator>::into_iter) {
|
||||
debug self => _14;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_13);
|
||||
StorageLive(_12);
|
||||
StorageLive(_3);
|
||||
StorageLive(_7);
|
||||
StorageLive(_4);
|
||||
StorageLive(_6);
|
||||
_3 = Len((*_1));
|
||||
StorageLive(_4);
|
||||
StorageLive(_5);
|
||||
_3 = Len((*_1));
|
||||
_4 = &raw const (*_1);
|
||||
_5 = NonNull::<[T]> { pointer: _4 };
|
||||
_6 = _4 as *const T (PtrToPtr);
|
||||
_7 = NonNull::<T> { pointer: _6 };
|
||||
StorageDead(_5);
|
||||
StorageLive(_11);
|
||||
StorageLive(_8);
|
||||
_8 = const <T as std::mem::SizedTypeProperties>::IS_ZST;
|
||||
switchInt(move _8) -> [0: bb1, otherwise: bb2];
|
||||
_5 = _4 as *const T (PtrToPtr);
|
||||
_6 = NonNull::<T> { pointer: _5 };
|
||||
StorageLive(_10);
|
||||
StorageLive(_7);
|
||||
_7 = const <T as std::mem::SizedTypeProperties>::IS_ZST;
|
||||
switchInt(move _7) -> [0: bb1, otherwise: bb2];
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageLive(_10);
|
||||
StorageLive(_9);
|
||||
_9 = _4 as *mut T (PtrToPtr);
|
||||
_10 = Offset(_9, _3);
|
||||
StorageLive(_8);
|
||||
_8 = _4 as *mut T (PtrToPtr);
|
||||
_9 = Offset(_8, _3);
|
||||
StorageDead(_8);
|
||||
_10 = move _9 as *const T (PointerCoercion(MutToConstPointer));
|
||||
StorageDead(_9);
|
||||
_11 = move _10 as *const T (PointerCoercion(MutToConstPointer));
|
||||
StorageDead(_10);
|
||||
goto -> bb3;
|
||||
}
|
||||
|
||||
bb2: {
|
||||
_11 = _3 as *const T (Transmute);
|
||||
_10 = _3 as *const T (Transmute);
|
||||
goto -> bb3;
|
||||
}
|
||||
|
||||
bb3: {
|
||||
StorageDead(_8);
|
||||
StorageLive(_12);
|
||||
_12 = _11;
|
||||
_13 = std::slice::Iter::<'_, T> { ptr: _7, end_or_len: move _12, _marker: const ZeroSized: PhantomData<&T> };
|
||||
StorageDead(_12);
|
||||
StorageDead(_11);
|
||||
StorageDead(_6);
|
||||
StorageDead(_4);
|
||||
StorageDead(_7);
|
||||
StorageLive(_11);
|
||||
_11 = _10;
|
||||
_12 = std::slice::Iter::<'_, T> { ptr: _6, end_or_len: move _11, _marker: const ZeroSized: PhantomData<&T> };
|
||||
StorageDead(_11);
|
||||
StorageDead(_10);
|
||||
StorageDead(_5);
|
||||
StorageDead(_4);
|
||||
StorageDead(_6);
|
||||
StorageDead(_3);
|
||||
_14 = Rev::<std::slice::Iter<'_, T>> { iter: _13 };
|
||||
StorageDead(_13);
|
||||
StorageLive(_15);
|
||||
_15 = _14;
|
||||
_13 = Rev::<std::slice::Iter<'_, T>> { iter: _12 };
|
||||
StorageDead(_12);
|
||||
StorageLive(_14);
|
||||
_14 = _13;
|
||||
goto -> bb4;
|
||||
}
|
||||
|
||||
bb4: {
|
||||
StorageLive(_18);
|
||||
_16 = &mut _15;
|
||||
StorageLive(_17);
|
||||
_17 = &mut (_15.0: std::slice::Iter<'_, T>);
|
||||
_18 = <std::slice::Iter<'_, T> as DoubleEndedIterator>::next_back(move _17) -> [return: bb5, unwind: bb11];
|
||||
StorageLive(_16);
|
||||
StorageLive(_15);
|
||||
_15 = &mut (_14.0: std::slice::Iter<'_, T>);
|
||||
_16 = <std::slice::Iter<'_, T> as DoubleEndedIterator>::next_back(move _15) -> [return: bb5, unwind: bb11];
|
||||
}
|
||||
|
||||
bb5: {
|
||||
StorageDead(_17);
|
||||
_19 = discriminant(_18);
|
||||
switchInt(move _19) -> [0: bb6, 1: bb8, otherwise: bb10];
|
||||
StorageDead(_15);
|
||||
_17 = discriminant(_16);
|
||||
switchInt(move _17) -> [0: bb6, 1: bb8, otherwise: bb10];
|
||||
}
|
||||
|
||||
bb6: {
|
||||
StorageDead(_18);
|
||||
StorageDead(_15);
|
||||
StorageDead(_16);
|
||||
StorageDead(_14);
|
||||
drop(_2) -> [return: bb7, unwind continue];
|
||||
}
|
||||
|
||||
@ -156,18 +134,18 @@ fn reverse_loop(_1: &[T], _2: impl Fn(&T)) -> () {
|
||||
}
|
||||
|
||||
bb8: {
|
||||
_20 = ((_18 as Some).0: &T);
|
||||
StorageLive(_21);
|
||||
_21 = &_2;
|
||||
StorageLive(_22);
|
||||
_22 = (_20,);
|
||||
_23 = <impl Fn(&T) as Fn<(&T,)>>::call(move _21, move _22) -> [return: bb9, unwind: bb11];
|
||||
_18 = ((_16 as Some).0: &T);
|
||||
StorageLive(_19);
|
||||
_19 = &_2;
|
||||
StorageLive(_20);
|
||||
_20 = (_18,);
|
||||
_21 = <impl Fn(&T) as Fn<(&T,)>>::call(move _19, move _20) -> [return: bb9, unwind: bb11];
|
||||
}
|
||||
|
||||
bb9: {
|
||||
StorageDead(_22);
|
||||
StorageDead(_21);
|
||||
StorageDead(_18);
|
||||
StorageDead(_20);
|
||||
StorageDead(_19);
|
||||
StorageDead(_16);
|
||||
goto -> bb4;
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Test that the comments we emit in MIR opts are accurate.
|
||||
//
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
//@ compile-flags: -Zmir-include-spans
|
||||
//@ compile-flags: -Zmir-include-spans -C debuginfo=full
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
|
@ -7,7 +7,6 @@
|
||||
let _2: ();
|
||||
let mut _3: T;
|
||||
scope 1 (inlined std::mem::drop::<T>) {
|
||||
debug _x => _3;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
|
@ -7,7 +7,6 @@
|
||||
let _2: ();
|
||||
let mut _3: T;
|
||||
scope 1 (inlined std::mem::drop::<T>) {
|
||||
debug _x => _3;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
|
@ -7,7 +7,6 @@
|
||||
let _2: ();
|
||||
let mut _3: std::vec::Vec<bool>;
|
||||
scope 1 (inlined std::mem::drop::<Vec<bool>>) {
|
||||
debug _x => _3;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
|
@ -7,7 +7,6 @@
|
||||
let _2: ();
|
||||
let mut _3: std::vec::Vec<bool>;
|
||||
scope 1 (inlined std::mem::drop::<Vec<bool>>) {
|
||||
debug _x => _3;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
|
@ -7,7 +7,6 @@
|
||||
let _2: ();
|
||||
let mut _3: bool;
|
||||
scope 1 (inlined std::mem::drop::<bool>) {
|
||||
debug _x => _3;
|
||||
}
|
||||
|
||||
bb0: {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user