From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) by sourceware.org (Postfix) with ESMTPS id A6FB638582B0 for ; Wed, 8 Mar 2023 03:27:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A6FB638582B0 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com Received: by mail-qt1-x82e.google.com with SMTP id r5so16940139qtp.4 for ; Tue, 07 Mar 2023 19:27:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20210112.gappssmtp.com; s=20210112; t=1678246064; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=th1QxctmFsTaI9JM9SZS+uE+Y+NFMFAf9TSJ27snVJA=; b=Jwotm+/UE5ZBcZ6mapS+8cH2PcoGG/SjPFZ+zfchsDqQf9Bllskgox6kGLYS71YEqy gH5JbrC44toSl05H4goBxMIgpWUP380Un/nawk2htHCxIxs1RvkGBMitQT2ov1EAPihS Lj6uLm8adN0hpmXUHdI6GAzzV54J7ffK6GhHOj1qPjyAJbaK2ZotOB7rt8kmup7lV2K0 zTqXpsqEYmd9TdOv4tu7zO4ZB0TO42aJLeIIlhu45Yeb5rdpZUWmcd0yswVEOyCYOeAj 4eLmlN8BwEIkqiVI01R063qcNBc2BRq/31m9nf01g6qAyZNae3yfr66zpu6vPdC68lrx zM+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678246064; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=th1QxctmFsTaI9JM9SZS+uE+Y+NFMFAf9TSJ27snVJA=; b=iVqtJq91gSSU0Haz0bC8sphpLFKTbePa0CWEj74UmlaZkNRTlg80xKqjaZ8qpxhxZg eBLQULjVzVHDg60/WmjtG/WWFCgkdD0LiYltuSJTa5t0rBbwObl5Voujn96er9CPwnvL EyWvTfhVwowKuwwgFBZDQ3wrqimgSsgal8ZcYMdBMkxJxUHJ5Ohz4pYSpGgd9gHFRjVb erYunXWddUBfXniwslKjhar9kqpjIp+8IgSr5a6eHnBPK1Z8GeiFSIEJooMMcJR2iVlc iiDU59orKqIsje4+9mvucq/LcOyHCbG1tYZNfhHWIZ933RxFolG2fnubRW6hfR89eOTJ 8Iqw== X-Gm-Message-State: AO0yUKVcVvf9ejjOZHMIrSRTt90UEZpmrftO/GywwawtVDy8mASBvSJ5 vCPmZ+vsotzAvP45XNV3LDjMZXMCLD5ecPoq8Ic= X-Google-Smtp-Source: AK7set8/umoqzQU3zmymK6OxvgEHerKRp1shKIAa1/9l4zVw14S6cGgREQY69a2QFsRp7BW4AiDT8g== X-Received: by 2002:a05:622a:1106:b0:3b9:bd05:bde1 with SMTP id e6-20020a05622a110600b003b9bd05bde1mr28370221qty.8.1678246063912; Tue, 07 Mar 2023 19:27:43 -0800 (PST) Received: from system76-pc.ba.rivosinc.com ([136.57.172.92]) by smtp.gmail.com with ESMTPSA id v21-20020ac87295000000b003b6382f66b1sm10759696qto.29.2023.03.07.19.27.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 19:27:43 -0800 (PST) From: Michael Collison To: gcc-patches@gcc.gnu.org Subject: [PATCH v3 2/6] RISC-V: autovec: Export policy functions to global scope Date: Tue, 7 Mar 2023 22:27:36 -0500 Message-Id: <20230308032740.989275-3-collison@rivosinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230308032740.989275-1-collison@rivosinc.com> References: <20230308032740.989275-1-collison@rivosinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 2023-03-02 Michael Collison Juzhe Zhong * config/riscv/riscv-vector-builtins.cc (get_tail_policy_for_pred): Remove static declaration to to make externally visible. (get_mask_policy_for_pred): Ditto. * config/riscv/riscv-vector-builtins.h (get_tail_policy_for_pred): New external declaration. (get_mask_policy_for_pred): Ditto. --- gcc/config/riscv/riscv-vector-builtins.cc | 4 ++-- gcc/config/riscv/riscv-vector-builtins.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/config/riscv/riscv-vector-builtins.cc b/gcc/config/riscv/riscv-vector-builtins.cc index 2d57086262b..352ffd8867d 100644 --- a/gcc/config/riscv/riscv-vector-builtins.cc +++ b/gcc/config/riscv/riscv-vector-builtins.cc @@ -2448,7 +2448,7 @@ use_real_merge_p (enum predication_type_index pred) /* Get TAIL policy for predication. If predication indicates TU, return the TU. Otherwise, return the prefer default configuration. */ -static rtx +rtx get_tail_policy_for_pred (enum predication_type_index pred) { if (pred == PRED_TYPE_tu || pred == PRED_TYPE_tum || pred == PRED_TYPE_tumu) @@ -2458,7 +2458,7 @@ get_tail_policy_for_pred (enum predication_type_index pred) /* Get MASK policy for predication. If predication indicates MU, return the MU. Otherwise, return the prefer default configuration. */ -static rtx +rtx get_mask_policy_for_pred (enum predication_type_index pred) { if (pred == PRED_TYPE_tumu || pred == PRED_TYPE_mu) diff --git a/gcc/config/riscv/riscv-vector-builtins.h b/gcc/config/riscv/riscv-vector-builtins.h index 8464aa9b7e9..d62d2bdab54 100644 --- a/gcc/config/riscv/riscv-vector-builtins.h +++ b/gcc/config/riscv/riscv-vector-builtins.h @@ -456,6 +456,8 @@ extern const char *const operand_suffixes[NUM_OP_TYPES]; extern const rvv_builtin_suffixes type_suffixes[NUM_VECTOR_TYPES + 1]; extern const char *const predication_suffixes[NUM_PRED_TYPES]; extern rvv_builtin_types_t builtin_types[NUM_VECTOR_TYPES + 1]; +extern rtx get_tail_policy_for_pred (enum predication_type_index pred); +extern rtx get_mask_policy_for_pred (enum predication_type_index pred); inline tree rvv_arg_type_info::get_scalar_type (vector_type_index type_idx) const -- 2.34.1