A control-flow graph can be said to have βbalancedΒ flowβ if the flow
(execution count) of each node is equal to the sum of its in-edge flows,
and also equal to the sum of its out-edge flows.
For each node in a control-flow graph, determines whether that node should
have a physical counter, or a counter expression that is derived from the
physical counters of other nodes.
Arranges the nodes in balanced_graph into a list, such that earlier nodes
take priority in being given a counter expression instead of a physical counter.