-
Notifications
You must be signed in to change notification settings - Fork 281
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
Fix ordering of operands in ScheduledPipelineOp::build #5585
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.
this looks right!
lib/Dialect/Pipeline/PipelineOps.cpp
Outdated
odsState.addOperands(go); | ||
odsState.addOperands(clock); | ||
odsState.addOperands(reset); | ||
|
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.
nit: I would prefer no newlines here.
@@ -2,7 +2,7 @@ | |||
|
|||
// CHECK-LABEL: hw.module @pipeline( | |||
// CHECK-SAME: %[[VAL_0:.*]]: i32, %[[VAL_1:.*]]: i32, %[[VAL_2:.*]]: i1, %[[VAL_3:.*]]: i1, %[[VAL_4:.*]]: i1) -> (out: i32) { | |||
// CHECK: %[[VAL_5:.*]], %[[VAL_6:.*]] = pipeline.scheduled(%[[VAL_7:.*]] : i32 = %[[VAL_0]], %[[VAL_8:.*]] : i32 = %[[VAL_1]]) clock(%[[VAL_9:.*]] = %[[VAL_2]]) reset(%[[VAL_10:.*]] = %[[VAL_3]]) go(%[[VAL_11:.*]] = %[[VAL_4]]) -> (out : i32) { | |||
// CHECK: %[[VAL_5:.*]], %[[VAL_6:.*]] = pipeline.scheduled(%[[VAL_7:.*]] : i32 = %[[VAL_0]], %[[VAL_8:.*]] : i32 = %[[VAL_1]]) clock(%[[VAL_9:.*]] = %[[VAL_3]]) reset(%[[VAL_10:.*]] = %[[VAL_4]]) go(%[[VAL_11:.*]] = %[[VAL_2]]) -> (out : i32) { |
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.
Why was this change necessary? This implies that this particular builder was being used by the parser.
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.
The builder is used in the scheduling pass, hence when the result was being printed, operands were printed in the wrong order. If i (or the reviewers) of this had been a bit more attentive, we'd have spotted this issue there.
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.
Awesome - thank you for spotting this and fixing it. I could say that it was something i intentionally put in here to get you to do your first PR, but then i'd be lying and covering up for my own negligence... 🙃.
This is a fix for #5584.
ScheduledPipelineOp::build
is changed to add operands in the same order thatPipelineOps.td
expects.