tensorflow/compiler/mlir/xla/transforms/legalize_tf_communication.cc
// Updates function type based on current function body block arguments and
// terminator operand types.
Updates function type based on current function body block arguments and
terminator operand types.
Updates function type based on current function body block arguments and terminator operand types .
void UpdateFunctionType(OpBuilder& builder, FuncOp func, Block& func_body) {
  auto new_argument_types = llvm::to_vector(func_body.getArgumentTypes());
  auto new_result_types =
      llvm::to_vector(func_body.getTerminator()->getOperandTypes());
  func.setType(FunctionType::get(builder.getContext(), new_argument_types,
                                 new_result_types));
}
void UpdateFunctionType ( OpBuilder & builder , FuncOp func , Block & func_body ) { auto new_argument_types = llvm :: to_vector ( func_body . getArgumentTypes ( ) ) ; auto new_result_types = llvm :: to_vector ( func_body . getTerminator ( ) -> getOperandTypes ( ) ) ; func . setType ( FunctionType :: get ( builder . getContext ( ) , new_argument_types , new_result_types ) ) ; }
Updates function type based on current function body block arguments and
terminator operand types.
Updates function type based on current function body block arguments and terminator operand types .