public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 02/07] RISC-V: Add auto-vectorization support
@ 2023-03-03  4:52 Michael Collison
  0 siblings, 0 replies; only message in thread
From: Michael Collison @ 2023-03-03  4:52 UTC (permalink / raw)
  To: gcc-patches

This patch adds foundational support by making two functions that handle 
predication policies visibly globally.

gcc/ChangeLog:

     * 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 2e92ece3b64..90fc73a5bcf 100644
--- a/gcc/config/riscv/riscv-vector-builtins.cc
+++ b/gcc/config/riscv/riscv-vector-builtins.cc
@@ -1850,7 +1850,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)
@@ -1860,7 +1860,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 ede08c6a480..135e2463b1e 100644
--- a/gcc/config/riscv/riscv-vector-builtins.h
+++ b/gcc/config/riscv/riscv-vector-builtins.h
@@ -433,6 +433,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 bool
  function_instance::operator!= (const function_instance &other) const
-- 
2.34.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-03  4:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-03  4:52 [PATCH 02/07] RISC-V: Add auto-vectorization support Michael Collison

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).