Skip to content
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

[SSP] Add SSP <-> circt::scheduling conversion utilities. #3636

Merged
merged 2 commits into from Aug 4, 2022

Conversation

jopperm
Copy link
Contributor

@jopperm jopperm commented Jul 31, 2022

This PR adds the missing pieces to link the SSP dialect to the scheduling infra.

NB: It's debatable whether the -ssp-roundtrip pass should live with the other scheduling test passes. I mostly put it in there because SSP doesn't have the pass boilerplate yet. However, my current plan is to rework all of this anyways, and replace the test passes with a (public) -schedule pass to operate on SSP IR.

Copy link
Contributor

@mikeurbach mikeurbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question, but looks good otherwise, this is great!

ArrayAttr saveInstanceProperties(ProblemT &prob, ImplicitLocOpBuilder &b) {
SmallVector<Attribute> props;
Attribute prop;
((prop = InstancePropertyTs::getFromProblem(prob, b.getContext()),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this form required? It may just be me, but coming from the LLVM coding standards, it seems a little dense and surprising. I've never seen the ... in LLVM/MLIR C++ code like this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this form required?

No, in this case, the alternative would be to have helper templates that unpack the type parameters by recursion.

It may just be me, but coming from the LLVM coding standards, it seems a little dense and surprising.

Funnily, I had the same reaction when I first learned about the fold expressions from @7FM 🤓 However, I find the construct quite neat now. I added comments to point out what's happening.

I've never seen the ... in LLVM/MLIR C++ code like this.

Fold expressions are a C++17 feature, but people would like to use them in the future.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, if this is a new, well understood c++17 feature, then sounds good to me. Glad we have the ability to use the "new" stuff in CIRCT.

@jopperm jopperm merged commit 392e273 into main Aug 4, 2022
@jopperm jopperm deleted the jopperm/ssp-pr5 branch August 4, 2022 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants