-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustc_codegen_ssa: only create backend BasicBlock
s as-needed.
#84993
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,13 +14,13 @@ pub fn exhaustive_match(e: E) -> u8 { | |
// CHECK-NEXT: i[[TY:[0-9]+]] [[DISCR:[0-9]+]], label %[[A:[a-zA-Z0-9_]+]] | ||
// CHECK-NEXT: i[[TY:[0-9]+]] [[DISCR:[0-9]+]], label %[[B:[a-zA-Z0-9_]+]] | ||
// CHECK-NEXT: ] | ||
// CHECK: [[B]]: | ||
// CHECK-NEXT: store i8 1, i8* %1, align 1 | ||
// CHECK-NEXT: br label %[[EXIT:[a-zA-Z0-9_]+]] | ||
// CHECK: [[OTHERWISE]]: | ||
// CHECK-NEXT: unreachable | ||
// CHECK: [[A]]: | ||
// CHECK-NEXT: store i8 0, i8* %1, align 1 | ||
// CHECK-NEXT: br label %[[EXIT:[a-zA-Z0-9_]+]] | ||
// CHECK: [[B]]: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This suggests to me these checks want to be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's a |
||
// CHECK-NEXT: store i8 1, i8* %1, align 1 | ||
// CHECK-NEXT: br label %[[EXIT:[a-zA-Z0-9_]+]] | ||
match e { | ||
E::A => 0, | ||
|
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.
Would it not make sense to just check for this within
append_block
function? I guess if we did that, we'd end up in a situation where we stillformat!
potentially many strings only for them to be ignored?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.
Yeah - I think I want to solve it similar to how I did for SSA values and
set_name
on them, I just don't want to do it now.