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

Issue430 #626

Merged
merged 3 commits into from
May 15, 2017
Merged

Issue430 #626

merged 3 commits into from
May 15, 2017

Conversation

mihaibudiu
Copy link
Contributor

This fix makes the semantics of digest to be eager: the digest is evaluated at the place of the call, and not at the end of the pipeline. This can break P4-14 programs which depended on the old behavior, but we hope that no one really did. P4-16 does not allow such semantics.

The new test does not really exhibit this case, since the conversion is in the back-end, and the generated reference file is in the mid-end, but the test file can be used to manually inspect that the transformation is correct.

@@ -204,6 +204,8 @@ MidEnd::MidEnd(CompilerOptions& options) {
new P4::TableHit(&refMap, &typeMap),
new P4::SynthesizeActions(&refMap, &typeMap, new SkipControls(skipv1controls)),
new P4::MoveActionsToTables(&refMap, &typeMap),
new P4::MidEndLast(),
// Here is actually the start of the BMv2-specific back-end
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can consider moving them to backend.cpp?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What is "them"?
After this point there are still a few mid-end passes run, but logically what follows is bmv2-specific.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't have any problem moving the invocation of these passes to another file.

@ChrisDodd ChrisDodd merged commit 95db4f5 into p4lang:master May 15, 2017
@mihaibudiu mihaibudiu deleted the issue430 branch May 26, 2017 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants