Use True/False constants for cfg branching if known at compile time
avoid needless Tag(0, MakeTuple()) calls
This Tag(0, MakeTuple()) is also needed if there is only a single successor. Do we also want to use a constant in that case?
If the True/False value of a branch is known at compile-time, I think an even better solution would be to just remove the unreachable branch. This should also make our program analysis a bit smarter
This Tag(0, MakeTuple()) is also needed if there is only a single successor. Do we also want to use a constant in that case?
Yes
If the True/False value of a branch is known at compile-time, I think an even better solution would be to just remove the unreachable branch.
Perhaps, but any HUGR compiler should do that as a normalisation pass pretty early on