-
Notifications
You must be signed in to change notification settings - Fork 447
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
Fixing bug in ParserUnroll for infinite loops without header stacks #3538
Conversation
Does this also fix issue281? |
This does fix the specific case described in #3537, but
The following is produced:
using:
|
Here is yet another example for which this transformation produces semantically different IR:
This produces:
because the pass does not consider that I am a little concerned that this pass may be overly liberal in classifying loops as infinite loops. Other backends may define externs similar to |
Yes, It does |
@kfcripps, Thanks for another example. I added it to the test suite of the ParserUnroll. |
@VolodymyrPeschanenkoLitSoft This PR seems to fix the problems I have been experiencing, thank you. |
Fixes #3537 |
I noticed that when I build test testdata/p4_16_samples/parser-unroll-issue3537-1.p4, the following warning is emitted:
Why is this warning printed here? Why do I care that I have a parser cycle that doesn't extract any bytes? In the case of this example, I only want to advance the packet cursor without extracting any headers, so I'm not sure what I can do to get rid of this warning. |
@kfcripps if you think this is a problem you should probably file a new issue, this comment will get lost attached to a closed PR. |
These changes allow leaving as is the infinite loops for programs without extraction of the header stack (#3537)