message: [Grappler] Do not add control edges from placeholder inputs in function inlining
diff: @@ -1122,7 +1122,15 @@ void AddStrictInputSemantics(Node* caller, Graph* g) {
  VLOG(3) << "Add control edges from all data inputs to enforce strict "
  "semantics with regard to function inputs";
  +
  + // Do not add control edges from placeholders, because it will prevent
  + // pruning, and they can't produce any side effects anyway.
  + const auto is_placeholder = [](const Node* node) -> bool {
  + return node->type_string() == "Placeholder";
  + };
  +
  for (const Node* node : data_inputs) {
  + if (is_placeholder(node)) continue;
  g->AddControlEdge(g->FindNodeId(node->id()), caller,
  /*allow_duplicates=*/true);
  }
  