I have not yet found an example of a loop starting with for (typeRef var in listExpr) { ... } that is unrolled.
It seems like that kind of loop would be the easiest to unroll, since the exact number of iterations is guaranteed to be a compile-time constant value, i.e. the number of elements in the list expression, and all P4 list expressions have a compile-time known number of elements.
currently the ForInLoop code in unrollLoops can only handle ranges. Adding lists of integers should be trivial -- lists of complex things would be trickier.
I have not yet found an example of a loop starting with
for (typeRef var in listExpr) { ... }
that is unrolled.It seems like that kind of loop would be the easiest to unroll, since the exact number of iterations is guaranteed to be a compile-time constant value, i.e. the number of elements in the list expression, and all P4 list expressions have a compile-time known number of elements.