Commit ffaab58c authored by Jacques Pienaar's avatar Jacques Pienaar Committed by TensorFlower Gardener
Browse files

Simplify analysis in funcitonalize_cond by splitting CondState.

* Split CondState into CondState (which corresponds to scope previously) and
  AncestorState (which tracks which switch/merge nodes are an ancestor of a
  ndoe). Previously CondState tracked both but that resulted in difficult to
  follow meet rules. Instead by splitting these out the meet for merge and
  non-merge are straight forward set operations. The ancestor relation is
  similarly easy to compute along with CondState computation.
* Enhance the redundant switch checking: previously we only considered the
  predicates but
    %s=switch(val=%P, pred=switch(%P_1, %P):then)
  is also redundant as if %P is true then %s:else is dead.
* Enhance in-edge testing to insert a switch if a value from an outer context
  is consumed inside an inner context.
* Rename CondStateMap to StateMap to match new usage.

PiperOrigin-RevId: 211622021
parent 858f4672
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment