| 1287 | } |
| 1288 | |
| 1289 | Status FunctionalizeCond::DetermineStates(std::vector<Node*> rev_topo_order) { |
| 1290 | // The state that is propagated along the given edge. |
| 1291 | for (auto it = rev_topo_order.rbegin(); it != rev_topo_order.rend(); ++it) { |
| 1292 | Node* dst = *it; |
| 1293 | TF_RETURN_IF_ERROR(DetermineCondState(dst)); |
| 1294 | TF_RETURN_IF_ERROR(DetermineAncestorState(dst)); |
| 1295 | if (IsSwitch(dst)) TF_RETURN_IF_ERROR(RemoveRedundantSwitch(dst)); |
| 1296 | if (IsMerge(dst)) TF_RETURN_IF_ERROR(RemoveRedundantMerge(dst)); |
| 1297 | |
| 1298 | VLOG(5) << dst->name() << " :: " << state_map_.CondStateToString(dst) |
| 1299 | << " @ " << state_map_.AncestorStateToString(dst); |
| 1300 | if (VLOG_IS_ON(10)) DumpGraphWithCondState("it"); |
| 1301 | } |
| 1302 | return Status::OK(); |
| 1303 | } |
| 1304 | |
| 1305 | Status FunctionalizeCond::DetermineAncestorState(Node* dst) { |
| 1306 | StateMap::AncestorId id = nullptr; |
nothing calls this directly
no test coverage detected