You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a variety of reasons (fixed-point algorithms, compiler transformations that duplicate portions of the IR tree, utility code being invoke from multiple passes) we can end up printing the same error message many times. Loop unrolling is a place where this is biting us in a particularly nasty way.
There are ad hoc solutions for this problem at various places in the code; one example is the usage of iterCounter here:
The simplest solution is to bail out from compiling. This works for errors, not for warnings.
A PassManager will stop after the first pass that signals an error by default. So will a RepeatedPass.
So the only issue is within a pass, which should be tractable.
(I am not aware of any loop unrolling code that is being run in the front-end.)
Bailing out would work for errors, that's true. It's nice to report as many errors as possible, though, to reduce the number of edit-compile cycles a P4 developer has to go through.
For a variety of reasons (fixed-point algorithms, compiler transformations that duplicate portions of the IR tree, utility code being invoke from multiple passes) we can end up printing the same error message many times. Loop unrolling is a place where this is biting us in a particularly nasty way.
There are ad hoc solutions for this problem at various places in the code; one example is the usage of
iterCounter
here:https://github.com/p4lang/p4c/blob/master/frontends/p4-14/typecheck.cpp#L291
It would be good to have a more general solution to this problem. We should think about what the requirements are.
The text was updated successfully, but these errors were encountered: