forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#117029 - rmehri01:mir_opt_filecheck_inline_te…
…sts, r=cjgillot Add FileCheck annotations to MIR-opt inlining tests Part of rust-lang#116971, adds FileCheck annotations to MIR-opt tests in `tests/mir-opt/inline`. I left out a few (such as `inline_cycle`) where it mentioned that the particular outcome of inlining isn't important, just that the inliner doesn't get stuck in an infinite loop. r? cjgillot
- Loading branch information
Showing
29 changed files
with
156 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,29 @@ | ||
// skip-filecheck | ||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY | ||
// compile-flags: -Zinline-mir-hint-threshold=1000 | ||
|
||
// EMIT_MIR cycle.f.Inline.diff | ||
#[inline(always)] | ||
fn f(g: impl Fn()) { | ||
// CHECK-LABEL: fn f( | ||
// CHECK-NOT: inlined | ||
g(); | ||
} | ||
|
||
// EMIT_MIR cycle.g.Inline.diff | ||
#[inline(always)] | ||
fn g() { | ||
// CHECK-LABEL: fn g( | ||
// CHECK-NOT: inlined | ||
// CHECK: (inlined f::<fn() {main}>) | ||
// CHECK-NOT: inlined | ||
f(main); | ||
} | ||
|
||
// EMIT_MIR cycle.main.Inline.diff | ||
fn main() { | ||
// CHECK-LABEL: fn main( | ||
// CHECK-NOT: inlined | ||
// CHECK: (inlined f::<fn() {g}>) | ||
// CHECK-NOT: inlined | ||
f(g); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
// skip-filecheck | ||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY | ||
// unit-test: Inline | ||
// compile-flags: --crate-type=lib | ||
|
||
// EMIT_MIR inline_box_fn.call.Inline.diff | ||
fn call(x: Box<dyn Fn(i32)>) { | ||
// CHECK-LABEL: fn call( | ||
// CHECK-NOT: inlined | ||
x(1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.