From patchwork Wed Nov 27 10:48:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 1201498 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-514699-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="lKSY5lHB"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47NHZP1nslz9sRD for ; Wed, 27 Nov 2019 21:48:59 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=Wb9LCcJoV+BuNxye7iwAJUmdIrjTB3ZHctkTSVKpkE1GDvJ5wsCL2 +FEAGOomfpMWVuwbOXbOxwBiIzvo7S7JEuNCDFkX7hGEStXG4pL/WqfrdNtiZj4c pXv8Zf4Jvkv5QSEN7W7zdw54FJSEno3HmyLbG5TJ+KB68hE3UGyvTc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=D5J+SoCczpraDUSBj+eZjGMzDK0=; b=lKSY5lHBeaFPqFjszzY1 RdH6YF/rdfjzOlvhPkhuJQgT1K8XJgsX9NcJBALm9S9id38IstG4i2bvgiqwXxTW 8pkHPBeIrAWyqP/GJmGnfrSS7DcjKcoOcSHz/510fAy0KPyaoXShz/dXhvPNT0kJ s9N2cmSI3S8gSKAAbmmmw8c= Received: (qmail 31325 invoked by alias); 27 Nov 2019 10:48:52 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 31317 invoked by uid 89); 27 Nov 2019 10:48:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, SPF_PASS autolearn=ham version=3.3.1 spammy=Hook X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 27 Nov 2019 10:48:46 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C7F49B011 for ; Wed, 27 Nov 2019 10:48:43 +0000 (UTC) Date: Wed, 27 Nov 2019 11:48:43 +0100 (CET) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Remove unused TARGET_VECTORIZE_BUILTIN_CONVERSION Message-ID: User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 All conversions go via standard optabs now. Bootstrap running on x86_64-unknown-linux-gnu. Richard. 2019-11-27 Richard Biener * target.def (TARGET_VECTORIZE_BUILTIN_CONVERSION): Remove. * targhooks.c (default_builtin_vectorized_conversion): Likewise. * targhooks.h (default_builtin_vectorized_conversion): Likewise. * optabs-tree.c (supportable_convert_operation): Do not call targetm.vectorize.builtin_conversion. * doc/tm.texi.in (TARGET_VECTORIZE_BUILTIN_CONVERSION): Remove. * doc/tm.texi: Regenerate. Index: gcc/target.def =================================================================== --- gcc/target.def (revision 278758) +++ gcc/target.def (working copy) @@ -1797,22 +1797,6 @@ return type of the vectorized function s tree, (tree fndecl, tree vec_type_out, tree vec_type_in), default_builtin_md_vectorized_function) -/* Returns a function declaration for a builtin that realizes the - vector conversion, or NULL_TREE if not available. */ -DEFHOOK -(builtin_conversion, - "This hook should return the DECL of a function that implements conversion of the\n\ -input vector of type @var{src_type} to type @var{dest_type}.\n\ -The value of @var{code} is one of the enumerators in @code{enum tree_code} and\n\ -specifies how the conversion is to be applied\n\ -(truncation, rounding, etc.).\n\ -\n\ -If this hook is defined, the autovectorizer will use the\n\ -@code{TARGET_VECTORIZE_BUILTIN_CONVERSION} target hook when vectorizing\n\ -conversion. Otherwise, it will return @code{NULL_TREE}.", - tree, (unsigned code, tree dest_type, tree src_type), - default_builtin_vectorized_conversion) - /* Cost of different vector/scalar statements in vectorization cost model. In case of misaligned vector loads and stores the cost depends on the data type and misalignment value. */ Index: gcc/targhooks.c =================================================================== --- gcc/targhooks.c (revision 278758) +++ gcc/targhooks.c (working copy) @@ -688,16 +688,6 @@ default_builtin_md_vectorized_function ( return NULL_TREE; } -/* Vectorized conversion. */ - -tree -default_builtin_vectorized_conversion (unsigned int code ATTRIBUTE_UNUSED, - tree dest_type ATTRIBUTE_UNUSED, - tree src_type ATTRIBUTE_UNUSED) -{ - return NULL_TREE; -} - /* Default vectorizer cost model values. */ int Index: gcc/targhooks.h =================================================================== --- gcc/targhooks.h (revision 278758) +++ gcc/targhooks.h (working copy) @@ -93,8 +93,6 @@ extern const char * default_invalid_with extern tree default_builtin_vectorized_function (unsigned int, tree, tree); extern tree default_builtin_md_vectorized_function (tree, tree, tree); -extern tree default_builtin_vectorized_conversion (unsigned int, tree, tree); - extern int default_builtin_vectorization_cost (enum vect_cost_for_stmt, tree, int); extern tree default_builtin_reciprocal (tree); Index: gcc/optabs-tree.c =================================================================== --- gcc/optabs-tree.c (revision 278758) +++ gcc/optabs-tree.c (working copy) @@ -317,15 +317,6 @@ supportable_convert_operation (enum tree return true; } - /* Now check for builtin. */ - if (targetm.vectorize.builtin_conversion - && targetm.vectorize.builtin_conversion (code, vectype_out, vectype_in)) - { - *code1 = CALL_EXPR; - *decl = targetm.vectorize.builtin_conversion (code, vectype_out, - vectype_in); - return true; - } return false; } Index: gcc/doc/tm.texi =================================================================== --- gcc/doc/tm.texi (revision 278758) +++ gcc/doc/tm.texi (working copy) @@ -5959,18 +5959,6 @@ instruction pattern. There is no need f implementation approaches itself. @end deftypefn -@deftypefn {Target Hook} tree TARGET_VECTORIZE_BUILTIN_CONVERSION (unsigned @var{code}, tree @var{dest_type}, tree @var{src_type}) -This hook should return the DECL of a function that implements conversion of the -input vector of type @var{src_type} to type @var{dest_type}. -The value of @var{code} is one of the enumerators in @code{enum tree_code} and -specifies how the conversion is to be applied -(truncation, rounding, etc.). - -If this hook is defined, the autovectorizer will use the -@code{TARGET_VECTORIZE_BUILTIN_CONVERSION} target hook when vectorizing -conversion. Otherwise, it will return @code{NULL_TREE}. -@end deftypefn - @deftypefn {Target Hook} tree TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION (unsigned @var{code}, tree @var{vec_type_out}, tree @var{vec_type_in}) This hook should return the decl of a function that implements the vectorized variant of the function with the @code{combined_fn} code Index: gcc/doc/tm.texi.in =================================================================== --- gcc/doc/tm.texi.in (revision 278758) +++ gcc/doc/tm.texi.in (working copy) @@ -4163,8 +4163,6 @@ address; but often a machine-dependent @hook TARGET_VECTORIZE_VEC_PERM_CONST -@hook TARGET_VECTORIZE_BUILTIN_CONVERSION - @hook TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION @hook TARGET_VECTORIZE_BUILTIN_MD_VECTORIZED_FUNCTION