-
Notifications
You must be signed in to change notification settings - Fork 454
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
Pass to get rid of action_run() calls #5053
Conversation
bd15e5c
to
7976cfe
Compare
7976cfe
to
b2f45cc
Compare
89e94d6
to
a26e2e0
Compare
96ece1f
to
e448341
Compare
e448341
to
4697edd
Compare
I've added the ability to use |
f544827
to
2f64c87
Compare
The other failures is caused by this line p4c/backends/p4tools/modules/testgen/targets/tofino/test/p4-programs/tna_simple_switch.p4 Line 33 in c67d1fd
This is also not a supported option for P4Testgen but the pragma is still parsed as input. |
I see three possible ways to solve this:
|
This line was not touched by this change, so there's no change here |
It's existing code that had no impact but is now active because of https://github.com/p4lang/p4c/pull/5053/files#diff-b033ed467d2767be363300d09ff13ac0a990d2e0de7464b732d9b29888da81a1R54. |
f5d6769
to
5e02a50
Compare
I modified |
Will be able to review the |
Created #5123 |
5e02a50
to
0d783c1
Compare
It requires that PR (for the testcase included here), and is (re)based on that. Ideally, that one will be approved (and merge first), then this one will rebase and become just the one change. |
It might take a little longer until #5123 is approved. @asl also had apprehensions. This PR could be merged before that, given the tests pass and look ok. |
841a8fb
to
ececb06
Compare
ececb06
to
c26d14a
Compare
ca82e11
to
977125f
Compare
- introduce new metadata set in the actions of the table Signed-off-by: Chris Dodd <[email protected]>
This is a general midend pass for any target that does not support
action_run
directly. It rewrites the actions in a table that uses action_run to set a newly introduced metadata tmp enum that records which action was run, and changes the switch statement to use that.It is kind-of logically the reverse of EliminateSwitch, which converts switch statements that don't use
action_run()
into ones that do, so it would never make sense to use both passes for a backend.Need to update p4test so we can select which pass(es) to run in a test by some annotation in the test program to better allow testing this.