-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[ir] Fix compilation crash when offloading LocalStoreStmt and AtomicOpStmt #813
Conversation
|
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.
LGTM! Just a minor nit.
@@ -278,6 +278,15 @@ bool Stmt::have_operand(Stmt *stmt) const { | |||
return false; | |||
} | |||
|
|||
int Stmt::locate_operand(Stmt **stmt) { | |||
for (int i = 0; i < num_operands(); i++) { |
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.
Here should we consider something like $1 = add $0, $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.
And we should probably add the tests in.
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.
I used Stmt **
rather than Stmt *
, so I think the values like the same $0
s wouldn't affect.
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.
And we should probably add the tests in.
Yeah, we should add #812 (comment) in. But I haven't come up with the name of the test.
(I don't think locate_operand
need tests)
I'm merging this in, for now, to fix the issue in #814. Let's resolve the comment later. |
Related PR = #812
[Click here for the format server]