-
Notifications
You must be signed in to change notification settings - Fork 449
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
Remove predication pass from p4test #3916
Conversation
Signed-off-by: Mihai Budiu <mbudiu@vmware.com>
Signed-off-by: Mihai Budiu <mbudiu@vmware.com>
Any particular reason the pass can not handle the conditionals in actions? Is that just because of BMv2? Or is the analysis too complex? Otherwise we could just parametrize. |
Predication cannot handle all forms of conditionals; in particular it cannot convert something like |
I checked the first 10 to 15 of the updated Does gauntlet run on the contents of all PR's? If not, when does gauntlet run? |
It does run on all the programs in the P4-16 testdata folder for every PR. However, it only runs on the output of |
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. I checked about the first 10 to 15 of the updated midend expected output files by hand, and found no errors. Fabian says that Gauntlet is run on all of the p4test expected output files, so hopefully it should catch any errors in any others that I did not check by hand.
Predication was actually a major source of mistranslations in the compiler. It would make sense that Gauntlet has no issues with it being removed. |
Signed-off-by: Mihai Budiu <mbudiu@vmware.com>
The main problem with the predication pass is that it either converts all ifs in actions to conditionals, or it emits a hard error.
The ideal solution would have the predication pass leave expressions it cannot handle untouched in the hope a subsequent pass can fix them.
A less ideal solution would be to have the predication pass leave the program unchanged if it fails to convert everything.
For now I have disabled completely the predication pass in p4test.
The downside is that the tests for predication which relied on p4test no longer do anything.
But hopefully other backends exercise predication enough.
The upside is that we remove many xfails.