From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb2a.google.com (mail-yb1-xb2a.google.com [IPv6:2607:f8b0:4864:20::b2a]) by sourceware.org (Postfix) with ESMTPS id A7F733858C52 for ; Fri, 5 May 2023 15:46:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A7F733858C52 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-yb1-xb2a.google.com with SMTP id 3f1490d57ef6-b9a6f17f2b6so14613734276.1 for ; Fri, 05 May 2023 08:46:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20221208.gappssmtp.com; s=20221208; t=1683301570; x=1685893570; 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=4mwuWxYQbyk6jdAcO7CNXr6srp68akJmHxPWCkHiEeA=; b=2Lsgv1iBtcJ7GJQWERx5SO5vNRzW/4rxFVIRXvWEaRROwHi4D1UwUk9TyRwhKe5+ec IYW1ank9CXmfMLuAJ5xhGUR52RnP93WX/gJo3smQsuWPl1WBImjesnqQFkrpweI7JC2m lGb0lhajyPEj8cE9EFcGBQbhcpdbtsnl3Qb7W5SVlaIELtkZZZGEXwatPp0tR+myFOUJ QN1CUtj6pTEHYjhXU4nx1Ko5SgiDtjZK5fhv3G/6o00y8y1kzOaYoZ19RT7xEgPV+UhV Y1dqo7fJ3lPruLYPFX0jYUiUzs0hjg4k3jYtI3RWK8xxwb+JNgN+meHs5Ghizs4S7aMM 2cYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683301570; x=1685893570; 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=4mwuWxYQbyk6jdAcO7CNXr6srp68akJmHxPWCkHiEeA=; b=SPohtuCymo+V0q4Of9nFOzhzMDkwohpMIA7kbkrbeXBORycD8P4Yg/TA7qu80Yi5Th 26BDCqb1FtR6vlj840RfK4E4UltUnndi5YwoWz4efS3YcnIHaiyJ7DOQgM6ibMv52rGD rjgC9XG8UQ+S3wfwYDTuCcr3HZRoecR/1WgGkFX4N+UOnhbicBLDwJ3SAag8dWTWZ0vN bMWsJjGJfIX9s/w16BpG8W3516U7XxFn5BePKb1FSpW9VaKcCpEwObMjA/+7HyczilJX v39jf5IReNx0d7Ea7PiHM7PM1CzVmSyE5cNbm4hxoSQ0F3PA4OtYv/QigTjBzbp/emeL nuTQ== X-Gm-Message-State: AC+VfDygiVUFQ7EqQXB4Dz3kf8uk+i39PFa412cJdOddwjyxHgt/sIS0 2n8vUTTRx7WgvRRWepMSYoMDs4XYq+HjNQIR71l48w== X-Google-Smtp-Source: ACHHUZ5AtrkGfuLNFqK/CrRUF1Lz5LTdAbcgGaF+N4ec5r1N/4Smhnl9dk0ebO2VILBQvHdnRncBvw== X-Received: by 2002:a81:8347:0:b0:55a:8293:e387 with SMTP id t68-20020a818347000000b0055a8293e387mr2235901ywf.19.1683301569896; Fri, 05 May 2023 08:46:09 -0700 (PDT) Received: from system76-pc.ba.rivosinc.com ([136.57.172.92]) by smtp.gmail.com with ESMTPSA id p203-20020a8174d4000000b0055a3420b25asm542446ywc.50.2023.05.05.08.46.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 08:46:09 -0700 (PDT) From: Michael Collison To: gcc-patches@gcc.gnu.org Subject: [PATCH v6 2/9] RISC-V: autovec: Export policy functions to global scope Date: Fri, 5 May 2023 11:46:00 -0400 Message-Id: <20230505154607.1155567-3-collison@rivosinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230505154607.1155567-1-collison@rivosinc.com> References: <20230505154607.1155567-1-collison@rivosinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/config/riscv/riscv-vector-builtins.cc b/gcc/config/riscv/riscv-vector-builtins.cc index 434bd8e157b..f0ebc095fa7 100644 --- a/gcc/config/riscv/riscv-vector-builtins.cc +++ b/gcc/config/riscv/riscv-vector-builtins.cc @@ -2496,7 +2496,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) @@ -2506,7 +2506,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 8ffb9d33e33..de3fd6ca290 100644 --- a/gcc/config/riscv/riscv-vector-builtins.h +++ b/gcc/config/riscv/riscv-vector-builtins.h @@ -483,6 +483,9 @@ extern rvv_builtin_types_t builtin_types[NUM_VECTOR_TYPES + 1]; extern function_instance get_read_vl_instance (void); extern tree get_read_vl_decl (void); +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