-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
constify Step trait and all of its implementations
#153821
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 |
|---|---|---|
|
|
@@ -39,16 +39,6 @@ pub fn array_of_tuple_le(a: &[(i16, u16); 2], b: &[(i16, u16); 2]) -> bool { | |
| // CHECK: %[[EQ00:.+]] = icmp eq i16 %[[A00]], %[[B00]] | ||
| // CHECK-NEXT: br i1 %[[EQ00]], label %[[L01:.+]], label %[[EXIT_S:.+]] | ||
|
|
||
| // CHECK: [[L01]]: | ||
| // CHECK: %[[PA01:.+]] = getelementptr{{.+}}i8, ptr %a, {{i32|i64}} 2 | ||
| // CHECK: %[[PB01:.+]] = getelementptr{{.+}}i8, ptr %b, {{i32|i64}} 2 | ||
| // CHECK: %[[A01:.+]] = load i16, ptr %[[PA01]] | ||
| // CHECK: %[[B01:.+]] = load i16, ptr %[[PB01]] | ||
| // CHECK-NOT: cmp | ||
| // CHECK: %[[EQ01:.+]] = icmp eq i16 %[[A01]], %[[B01]] | ||
| // CHECK-NEXT: br i1 %[[EQ01]], label %[[L10:.+]], label %[[EXIT_U:.+]] | ||
|
|
||
| // CHECK: [[L10]]: | ||
| // CHECK: %[[PA10:.+]] = getelementptr{{.+}}i8, ptr %a, {{i32|i64}} 4 | ||
| // CHECK: %[[PB10:.+]] = getelementptr{{.+}}i8, ptr %b, {{i32|i64}} 4 | ||
| // CHECK: %[[A10:.+]] = load i16, ptr %[[PA10]] | ||
|
|
@@ -64,7 +54,16 @@ pub fn array_of_tuple_le(a: &[(i16, u16); 2], b: &[(i16, u16); 2]) -> bool { | |
| // CHECK: %[[B11:.+]] = load i16, ptr %[[PB11]] | ||
| // CHECK-NOT: cmp | ||
| // CHECK: %[[EQ11:.+]] = icmp eq i16 %[[A11]], %[[B11]] | ||
| // CHECK-NEXT: br i1 %[[EQ11]], label %[[DONE:.+]], label %[[EXIT_U]] | ||
| // CHECK-NEXT: br i1 %[[EQ11]], label %[[DONE:.+]], label %[[EXIT_U:.+]] | ||
|
|
||
| // CHECK: [[L01]]: | ||
| // CHECK: %[[PA01:.+]] = getelementptr{{.+}}i8, ptr %a, {{i32|i64}} 2 | ||
| // CHECK: %[[PB01:.+]] = getelementptr{{.+}}i8, ptr %b, {{i32|i64}} 2 | ||
| // CHECK: %[[A01:.+]] = load i16, ptr %[[PA01]] | ||
| // CHECK: %[[B01:.+]] = load i16, ptr %[[PB01]] | ||
| // CHECK-NOT: cmp | ||
| // CHECK: %[[EQ01:.+]] = icmp eq i16 %[[A01]], %[[B01]] | ||
| // CHECK-NEXT: br i1 %[[EQ01]], label %{{.+}}, label %[[EXIT_U]] | ||
|
Member
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. Do we know what happened to cause this? Maybe one of the const-hack closure -> function conversions above changed inlining? If I'm reading this right, the new IR seems worse -- 0/2/4/6 vs. 0/4/6/2 seems like it might be at least a tiny regression.
Member
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. cc @scottmcm in case you have thoughts on the new IR -- I think it meets the goal of when we added it still...
Contributor
Author
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. my guess was this swapped basically by chance and since the rest is the same it should be fine.
Member
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. It's definitely weird that it swapped things like this in such a way that the only branch to the first block is from below -- or at least I'm assuming that that's why it ended up without a header? Should probably try to fix that so the block name substitutions are still meaningful? But in general, I'm not worried about the block order of the things, since that's really LLVM's business not ours, and is highly divorced from what we can do in code anyway. That said, I'm definitely sad about all these const hacks, and kinda wish they'd stop until the features existed -- if it needs const closures it should use const closures, for example. But that's not really my call :/
Contributor
Author
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. Const closures were reimplemented very recently and to my knowledge aren't supposed to be used in the std lib yet, these are rather tame const hacks. |
||
|
|
||
| // CHECK: [[DONE]]: | ||
| // CHECK: %[[RET:.+]] = phi i1 [ %{{.+}}, %[[EXIT_S]] ], [ %{{.+}}, %[[EXIT_U]] ], [ true, %[[L11]] ] | ||
|
|
||
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.
Definitely sad that this PR fixing
Stepthat's the main thing this needs still can't just usein 0..l😢Uh oh!
There was an error while loading. Please reload this page.
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.
Kind of a chicken and egg problem here, this is pretty much the last thing needed for const Ranges.