Framework for non-local branches in ControlFlowVisitor
- add support for tracking named 'global' flow paths between different
parts of the IR, useful for tracking data flow over things like
exit/return or calls or state transitions.
- allows sets of ordered_sets or ordered_sets as map keys in a sensible way.
Compares the underlying sets independent of the order, so that it is
possible to have ordered_sets where !(a < b) && !(b < a) && !(a == b).
Such sets contain the same elements but in a different order.
Restrict duplicate name check for P4Info to objects of the same "type" (#1849)
It seems that some people use P4Runtime with P4_14 programs. In P4_14 it
is valid (and quite common) when defining a keyless table with a const
default action to use the same same for both the table and the default
action. When the compiler translates the program to P4_16, it ensures
that the names are different but preserves the original names with a
@name annotation. The @name annotation is used when generating the
P4Info message. In order to avoid breaking backward-compatibility for
these P4_14 programs, it seems that we need to restrict the duplicate
name check to objects of the same type. This is a weaker guarantee than
what is required by both the P4_16 and the P4Runtime spec but in my
experience consumers of P4Info are capable of handling non-unique names,
as longs as names are unique for a given object type.