-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add FileCheck annotations to MIR-opt inlining tests #117029
Merged
bors
merged 29 commits into
rust-lang:master
from
rmehri01:mir_opt_filecheck_inline_tests
Nov 1, 2023
Merged
Changes from 27 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
62fe807
FileCheck asm_unwind
rmehri01 2d0a34b
FileCheck caller_with_trivial_bound
rmehri01 2f9aa7d
FileCheck cycle
rmehri01 9b3f5e1
FileCheck dont_ice_on_generic_rust_call
rmehri01 76faae9
FileCheck dyn_trait
rmehri01 f005d23
FileCheck exponential_runtime
rmehri01 22679cd
FileCheck inline_any_operand
rmehri01 de56d2d
FileCheck inline_box_fn
rmehri01 9d61e6a
FileCheck inline_closure_borrows_arg
rmehri01 5caee41
FileCheck inline_closure_captures
rmehri01 7ee05d2
FileCheck inline_closure
rmehri01 d8f33ef
FileCheck inline_diverging
rmehri01 20e7caa
FileCheck inline_coroutine
rmehri01 19c36a9
FileCheck inline_instruction_set
rmehri01 de82551
FileCheck inline_into_box_place
rmehri01 3202d4e
FileCheck inline_options
rmehri01 21a4c39
FileCheck inline_retag
rmehri01 2532566
FileCheck inline_specialization
rmehri01 f7acf17
FileCheck inline_trait_method_2
rmehri01 1b9cb5d
FileCheck inline_trait_method
rmehri01 773dc62
FileCheck inline_as_ref_as_mut
rmehri01 bb69597
FileCheck inline_scopes_parenting
rmehri01 5cf65eb
FileCheck issue_78442
rmehri01 6e047c0
FileCheck unchecked_shifts
rmehri01 3faf05b
FileCheck unsized_argument
rmehri01 6ab66c3
FileCheck unwrap_unchecked
rmehri01 1ec10ec
address review comments
rmehri01 2fcb4d9
change inline_retag to after.mir
rmehri01 5f75326
fix spans for inline_couroutine panic-abort
rmehri01 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 | ||
rmehri01 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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 | ||
rmehri01 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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
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,10 +1,11 @@ | ||
// skip-filecheck | ||
// ignore-endian-big | ||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY | ||
// ignore-debug MIR alignment checks in std alter the diff, breaking the test | ||
// compile-flags: -Zmir-opt-level=4 -Zinline-mir-hint-threshold=200 | ||
|
||
// EMIT_MIR inline_into_box_place.main.Inline.diff | ||
fn main() { | ||
// CHECK-LABEL: fn main( | ||
// CHECK: (inlined Box::<Vec<u32>>::new) | ||
let _x: Box<Vec<u32>> = Box::new(Vec::new()); | ||
} |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test verifies that we give the correct unwind block to the inline ASM. Added by #102778
It's only relevant for ASM that unwinds.
Could you:
// needs-unwind
directive at the top;asm!
terminator has an unwind block, and that unwind block is marked(cleanup)
?