-
Notifications
You must be signed in to change notification settings - Fork 11
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
ZIR-330: [Picus] Muxes, backs, and more #164
Conversation
@@ -175,13 +202,6 @@ class PicusPrinter { | |||
valuesToSignals.insert({pack.getOut(), nullptr}); | |||
} | |||
|
|||
void visitOp(ExternOp ext) { |
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 is this function no longer necessary? I still see a case for ExternOp in the switch above; is there some other overload which is meant to handle ExternOp now?
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 saw that we were doing the same thing for all of the nondeterministic Zll ops, so I lumped them into a common implementation:
// For nondeterministic operations, mark all results as fresh signals.
void visitNondetOp(Operation* op) {
for (Value result : op->getResults()) {
Signal signal = Signal::get(ctx, freshName());
valuesToSignals.insert({result, signal});
}
}
auto rhs = valuesToSignals.at(alias.getRhs()); | ||
for (auto [sl, sr] : llvm::zip(flatten(lhs), flatten(rhs))) { | ||
os << "(assert (= " << sl.str() << " " << sr.str() << "))\n"; | ||
// If lhs and rhs have the same lifetime, then aliasing them is |
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.
thank you for this clear explanation
picus_inline
attribute so the programmer can force inlining in Picus code (necessary forPo2
)