| 384 | } |
| 385 | |
| 386 | Status Conditional::AddSwitch(Node* s) { |
| 387 | VLOG(5) << "Adding switch " << s->DebugString(); |
| 388 | OutputTensor predicate; |
| 389 | TF_RETURN_IF_ERROR(GetSwitchPredicate(*s, &predicate)); |
| 390 | if (switch_predicate_.node == nullptr) switch_predicate_ = predicate; |
| 391 | if (!(switch_predicate_ == predicate)) { |
| 392 | return errors::InvalidArgument( |
| 393 | "Merge nodes ", NodesToString(merges_), |
| 394 | " directly dominated by switch nodes with different predicates (", |
| 395 | DebugString(switch_predicate_), " vs ", DebugString(predicate), ")."); |
| 396 | } |
| 397 | switches_.insert(s); |
| 398 | parent_->AddSwitchId(s->id()); |
| 399 | return Status::OK(); |
| 400 | } |
| 401 | |
| 402 | Status Conditional::BuildArgumentNodes() { |
| 403 | VLOG(1) << "Build function arguments"; |
nothing calls this directly
no test coverage detected