rust/tests/mir-opt/inline/dyn_trait.get_query.Inline.diff

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

55 lines
3.6 KiB
Diff
Raw Normal View History

2022-05-12 05:46:28 -05:00
- // MIR for `get_query` before Inline
+ // MIR for `get_query` after Inline
fn get_query(_1: &T) -> () {
2022-11-02 16:54:49 -05:00
debug t => _1; // in scope 0 at $DIR/dyn_trait.rs:+0:31: +0:32
let mut _0: (); // return place in scope 0 at $DIR/dyn_trait.rs:+0:38: +0:38
let _2: &<Q as Query>::C; // in scope 0 at $DIR/dyn_trait.rs:+1:9: +1:10
let mut _3: &T; // in scope 0 at $DIR/dyn_trait.rs:+1:22: +1:23
let mut _4: &<Q as Query>::C; // in scope 0 at $DIR/dyn_trait.rs:+2:23: +2:24
2022-05-12 05:46:28 -05:00
scope 1 {
2022-11-02 16:54:49 -05:00
debug c => _2; // in scope 1 at $DIR/dyn_trait.rs:+1:9: +1:10
2023-04-05 03:44:20 -05:00
+ scope 2 (inlined try_execute_query::<<Q as Query>::C>) { // at $DIR/dyn_trait.rs:35:5: 35:25
+ debug c => _4; // in scope 2 at $DIR/dyn_trait.rs:27:36: 27:37
+ let mut _5: &dyn Cache<V = <Q as Query>::V>; // in scope 2 at $DIR/dyn_trait.rs:28:14: 28:15
+ scope 3 (inlined mk_cycle::<<Q as Query>::V>) { // at $DIR/dyn_trait.rs:28:5: 28:16
+ debug c => _5; // in scope 3 at $DIR/dyn_trait.rs:21:27: 21:28
2022-05-12 05:46:28 -05:00
+ }
+ }
}
bb0: {
2022-11-02 16:54:49 -05:00
StorageLive(_2); // scope 0 at $DIR/dyn_trait.rs:+1:9: +1:10
StorageLive(_3); // scope 0 at $DIR/dyn_trait.rs:+1:22: +1:23
_3 = &(*_1); // scope 0 at $DIR/dyn_trait.rs:+1:22: +1:23
_2 = <Q as Query>::cache::<T>(move _3) -> bb1; // scope 0 at $DIR/dyn_trait.rs:+1:13: +1:24
2022-05-12 05:46:28 -05:00
// mir::Constant
2023-04-05 03:44:20 -05:00
// + span: $DIR/dyn_trait.rs:34:13: 34:21
2022-05-12 05:46:28 -05:00
// + user_ty: UserType(0)
2022-09-21 10:57:30 -05:00
// + literal: Const { ty: for<'a> fn(&'a T) -> &'a <Q as Query>::C {<Q as Query>::cache::<T>}, val: Value(<ZST>) }
2022-05-12 05:46:28 -05:00
}
bb1: {
2022-11-02 16:54:49 -05:00
StorageDead(_3); // scope 0 at $DIR/dyn_trait.rs:+1:23: +1:24
StorageLive(_4); // scope 1 at $DIR/dyn_trait.rs:+2:23: +2:24
_4 = &(*_2); // scope 1 at $DIR/dyn_trait.rs:+2:23: +2:24
- _0 = try_execute_query::<<Q as Query>::C>(move _4) -> bb2; // scope 1 at $DIR/dyn_trait.rs:+2:5: +2:25
2023-04-05 03:44:20 -05:00
+ StorageLive(_5); // scope 2 at $DIR/dyn_trait.rs:28:14: 28:15
+ _5 = _4 as &dyn Cache<V = <Q as Query>::V> (Pointer(Unsize)); // scope 2 at $DIR/dyn_trait.rs:28:14: 28:15
+ _0 = <dyn Cache<V = <Q as Query>::V> as Cache>::store_nocache(_5) -> bb2; // scope 3 at $DIR/dyn_trait.rs:22:5: 22:22
2022-05-12 05:46:28 -05:00
// mir::Constant
2023-04-05 03:44:20 -05:00
- // + span: $DIR/dyn_trait.rs:35:5: 35:22
2022-09-21 10:57:30 -05:00
- // + literal: Const { ty: for<'a> fn(&'a <Q as Query>::C) {try_execute_query::<<Q as Query>::C>}, val: Value(<ZST>) }
2023-04-05 03:44:20 -05:00
+ // + span: $DIR/dyn_trait.rs:22:7: 22:20
2022-09-21 10:57:30 -05:00
+ // + literal: Const { ty: for<'a> fn(&'a dyn Cache<V = <Q as Query>::V>) {<dyn Cache<V = <Q as Query>::V> as Cache>::store_nocache}, val: Value(<ZST>) }
2022-05-12 05:46:28 -05:00
}
bb2: {
2023-04-05 03:44:20 -05:00
+ StorageDead(_5); // scope 2 at $DIR/dyn_trait.rs:28:15: 28:16
2022-11-02 16:54:49 -05:00
StorageDead(_4); // scope 1 at $DIR/dyn_trait.rs:+2:24: +2:25
StorageDead(_2); // scope 0 at $DIR/dyn_trait.rs:+3:1: +3:2
return; // scope 0 at $DIR/dyn_trait.rs:+3:2: +3:2
2022-05-12 05:46:28 -05:00
}
}