public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-3526] aarch64: Reinstate some uses of CONSTEXPR
@ 2022-10-27 13:20 Richard Sandiford
  0 siblings, 0 replies; only message in thread
From: Richard Sandiford @ 2022-10-27 13:20 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:f95d3d5de72a1c43e8d529bad3ef59afc3214705

commit r13-3526-gf95d3d5de72a1c43e8d529bad3ef59afc3214705
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Thu Oct 27 14:20:23 2022 +0100

    aarch64: Reinstate some uses of CONSTEXPR
    
    In 9482a5e4eac8d696129ec2854b331e1bb5dbab42 I'd replaced uses
    of CONSTEXPR with direct uses of constexpr.  However, it turns
    out that we still have CONSTEXPR for a reason: GCC 4.8 doesn't
    implement constexpr properly, and for example rejects things like:
    
      extern const int x;
      constexpr int x = 1;
    
    This patch partially reverts the previous one.  To make things
    more complicated, there are still some things that need to be
    constexpr rather than CONSTEXPR, since they are used to initialise
    scalar constants.  The patch therefore doesn't change anything
    in aarch64-feature-deps.h.
    
    gcc/
            * config/aarch64/aarch64-protos.h: Replace constexpr with
            CONSTEXPR.
            * config/aarch64/aarch64-sve-builtins-base.cc: Likewise.
            * config/aarch64/aarch64-sve-builtins-functions.h: Likewise.
            * config/aarch64/aarch64-sve-builtins-shapes.cc: Likewise.
            * config/aarch64/aarch64-sve-builtins-sve2.cc: Likewise.
            * config/aarch64/aarch64-sve-builtins.cc: Likewise.
            * config/aarch64/aarch64.cc: Likewise.
            * config/aarch64/driver-aarch64.cc: Likewise

Diff:
---
 gcc/config/aarch64/aarch64-protos.h                |  6 +--
 gcc/config/aarch64/aarch64-sve-builtins-base.cc    | 56 +++++++++++-----------
 .../aarch64/aarch64-sve-builtins-functions.h       | 28 +++++------
 gcc/config/aarch64/aarch64-sve-builtins-shapes.cc  |  8 ++--
 gcc/config/aarch64/aarch64-sve-builtins-sve2.cc    | 12 ++---
 gcc/config/aarch64/aarch64-sve-builtins.cc         |  8 ++--
 gcc/config/aarch64/aarch64.cc                      |  2 +-
 gcc/config/aarch64/driver-aarch64.cc               |  4 +-
 8 files changed, 62 insertions(+), 62 deletions(-)

diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h
index 1a71f022841..238820581c5 100644
--- a/gcc/config/aarch64/aarch64-protos.h
+++ b/gcc/config/aarch64/aarch64-protos.h
@@ -254,7 +254,7 @@ typedef struct simd_vec_cost advsimd_vec_cost;
 /* SVE-specific extensions to the information provided by simd_vec_cost.  */
 struct sve_vec_cost : simd_vec_cost
 {
-  constexpr sve_vec_cost (const simd_vec_cost &base,
+  CONSTEXPR sve_vec_cost (const simd_vec_cost &base,
 			  unsigned int clast_cost,
 			  unsigned int fadda_f16_cost,
 			  unsigned int fadda_f32_cost,
@@ -354,7 +354,7 @@ using aarch64_scalar_vec_issue_info = aarch64_base_vec_issue_info;
    Advanced SIMD and SVE.  */
 struct aarch64_simd_vec_issue_info : aarch64_base_vec_issue_info
 {
-  constexpr aarch64_simd_vec_issue_info (aarch64_base_vec_issue_info base,
+  CONSTEXPR aarch64_simd_vec_issue_info (aarch64_base_vec_issue_info base,
 					 unsigned int ld2_st2_general_ops,
 					 unsigned int ld3_st3_general_ops,
 					 unsigned int ld4_st4_general_ops)
@@ -382,7 +382,7 @@ using aarch64_advsimd_vec_issue_info = aarch64_simd_vec_issue_info;
    is a concept of "predicate operations".  */
 struct aarch64_sve_vec_issue_info : aarch64_simd_vec_issue_info
 {
-  constexpr aarch64_sve_vec_issue_info
+  CONSTEXPR aarch64_sve_vec_issue_info
     (aarch64_simd_vec_issue_info base,
      unsigned int pred_ops_per_cycle,
      unsigned int while_pred_ops,
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
index 23b4d42822a..6347407555f 100644
--- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc
+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
@@ -177,7 +177,7 @@ public:
 class svac_impl : public function_base
 {
 public:
-  constexpr svac_impl (int unspec) : m_unspec (unspec) {}
+  CONSTEXPR svac_impl (int unspec) : m_unspec (unspec) {}
 
   rtx
   expand (function_expander &e) const override
@@ -209,7 +209,7 @@ public:
 class svadr_bhwd_impl : public function_base
 {
 public:
-  constexpr svadr_bhwd_impl (unsigned int shift) : m_shift (shift) {}
+  CONSTEXPR svadr_bhwd_impl (unsigned int shift) : m_shift (shift) {}
 
   rtx
   expand (function_expander &e) const override
@@ -259,7 +259,7 @@ public:
 class svbrk_binary_impl : public function_base
 {
 public:
-  constexpr svbrk_binary_impl (int unspec) : m_unspec (unspec) {}
+  CONSTEXPR svbrk_binary_impl (int unspec) : m_unspec (unspec) {}
 
   rtx
   expand (function_expander &e) const override
@@ -275,7 +275,7 @@ public:
 class svbrk_unary_impl : public function_base
 {
 public:
-  constexpr svbrk_unary_impl (int unspec) : m_unspec (unspec) {}
+  CONSTEXPR svbrk_unary_impl (int unspec) : m_unspec (unspec) {}
 
   rtx
   expand (function_expander &e) const override
@@ -309,7 +309,7 @@ public:
 class svclast_impl : public quiet<function_base>
 {
 public:
-  constexpr svclast_impl (int unspec) : m_unspec (unspec) {}
+  CONSTEXPR svclast_impl (int unspec) : m_unspec (unspec) {}
 
   rtx
   expand (function_expander &e) const override
@@ -381,7 +381,7 @@ public:
 class svcmp_impl : public function_base
 {
 public:
-  constexpr svcmp_impl (tree_code code, int unspec_for_fp)
+  CONSTEXPR svcmp_impl (tree_code code, int unspec_for_fp)
     : m_code (code), m_unspec_for_fp (unspec_for_fp) {}
 
   gimple *
@@ -437,7 +437,7 @@ public:
 class svcmp_wide_impl : public function_base
 {
 public:
-  constexpr svcmp_wide_impl (tree_code code, int unspec_for_sint,
+  CONSTEXPR svcmp_wide_impl (tree_code code, int unspec_for_sint,
 			     int unspec_for_uint)
     : m_code (code), m_unspec_for_sint (unspec_for_sint),
       m_unspec_for_uint (unspec_for_uint) {}
@@ -512,7 +512,7 @@ public:
 class svcnt_bhwd_impl : public function_base
 {
 public:
-  constexpr svcnt_bhwd_impl (machine_mode ref_mode) : m_ref_mode (ref_mode) {}
+  CONSTEXPR svcnt_bhwd_impl (machine_mode ref_mode) : m_ref_mode (ref_mode) {}
 
   gimple *
   fold (gimple_folder &f) const override
@@ -949,7 +949,7 @@ public:
 class svext_bhw_impl : public function_base
 {
 public:
-  constexpr svext_bhw_impl (scalar_int_mode from_mode)
+  CONSTEXPR svext_bhw_impl (scalar_int_mode from_mode)
     : m_from_mode (from_mode) {}
 
   rtx
@@ -1053,7 +1053,7 @@ public:
 class svlast_impl : public quiet<function_base>
 {
 public:
-  constexpr svlast_impl (int unspec) : m_unspec (unspec) {}
+  CONSTEXPR svlast_impl (int unspec) : m_unspec (unspec) {}
 
   rtx
   expand (function_expander &e) const override
@@ -1399,7 +1399,7 @@ public:
 class svldxf1_impl : public full_width_access
 {
 public:
-  constexpr svldxf1_impl (int unspec) : m_unspec (unspec) {}
+  CONSTEXPR svldxf1_impl (int unspec) : m_unspec (unspec) {}
 
   unsigned int
   call_properties (const function_instance &) const override
@@ -1426,7 +1426,7 @@ public:
 class svldxf1_extend_impl : public extending_load
 {
 public:
-  constexpr svldxf1_extend_impl (type_suffix_index memory_type, int unspec)
+  CONSTEXPR svldxf1_extend_impl (type_suffix_index memory_type, int unspec)
     : extending_load (memory_type), m_unspec (unspec) {}
 
   unsigned int
@@ -1616,7 +1616,7 @@ public:
 class svnot_impl : public rtx_code_function
 {
 public:
-  constexpr svnot_impl () : rtx_code_function (NOT, NOT, -1) {}
+  CONSTEXPR svnot_impl () : rtx_code_function (NOT, NOT, -1) {}
 
   rtx
   expand (function_expander &e) const override
@@ -1664,7 +1664,7 @@ public:
 class svpfirst_svpnext_impl : public function_base
 {
 public:
-  constexpr svpfirst_svpnext_impl (int unspec) : m_unspec (unspec) {}
+  CONSTEXPR svpfirst_svpnext_impl (int unspec) : m_unspec (unspec) {}
 
   rtx
   expand (function_expander &e) const override
@@ -1682,7 +1682,7 @@ public:
 class svprf_bhwd_impl : public function_base
 {
 public:
-  constexpr svprf_bhwd_impl (machine_mode mode) : m_mode (mode) {}
+  CONSTEXPR svprf_bhwd_impl (machine_mode mode) : m_mode (mode) {}
 
   unsigned int
   call_properties (const function_instance &) const override
@@ -1706,7 +1706,7 @@ public:
 class svprf_bhwd_gather_impl : public function_base
 {
 public:
-  constexpr svprf_bhwd_gather_impl (machine_mode mode) : m_mode (mode) {}
+  CONSTEXPR svprf_bhwd_gather_impl (machine_mode mode) : m_mode (mode) {}
 
   unsigned int
   call_properties (const function_instance &) const override
@@ -1744,7 +1744,7 @@ public:
 class svptest_impl : public function_base
 {
 public:
-  constexpr svptest_impl (rtx_code compare) : m_compare (compare) {}
+  CONSTEXPR svptest_impl (rtx_code compare) : m_compare (compare) {}
 
   rtx
   expand (function_expander &e) const override
@@ -1849,7 +1849,7 @@ public:
 class svqdec_svqinc_bhwd_impl : public function_base
 {
 public:
-  constexpr svqdec_svqinc_bhwd_impl (rtx_code code_for_sint,
+  CONSTEXPR svqdec_svqinc_bhwd_impl (rtx_code code_for_sint,
 				     rtx_code code_for_uint,
 				     scalar_int_mode elem_mode)
     : m_code_for_sint (code_for_sint),
@@ -1896,7 +1896,7 @@ public:
 class svqdec_bhwd_impl : public svqdec_svqinc_bhwd_impl
 {
 public:
-  constexpr svqdec_bhwd_impl (scalar_int_mode elem_mode)
+  CONSTEXPR svqdec_bhwd_impl (scalar_int_mode elem_mode)
     : svqdec_svqinc_bhwd_impl (SS_MINUS, US_MINUS, elem_mode) {}
 };
 
@@ -1904,7 +1904,7 @@ public:
 class svqinc_bhwd_impl : public svqdec_svqinc_bhwd_impl
 {
 public:
-  constexpr svqinc_bhwd_impl (scalar_int_mode elem_mode)
+  CONSTEXPR svqinc_bhwd_impl (scalar_int_mode elem_mode)
     : svqdec_svqinc_bhwd_impl (SS_PLUS, US_PLUS, elem_mode) {}
 };
 
@@ -1912,7 +1912,7 @@ public:
 class svqdecp_svqincp_impl : public function_base
 {
 public:
-  constexpr svqdecp_svqincp_impl (rtx_code code_for_sint,
+  CONSTEXPR svqdecp_svqincp_impl (rtx_code code_for_sint,
 				  rtx_code code_for_uint)
     : m_code_for_sint (code_for_sint),
       m_code_for_uint (code_for_uint)
@@ -2275,7 +2275,7 @@ public:
 class svsub_impl : public rtx_code_function
 {
 public:
-  constexpr svsub_impl ()
+  CONSTEXPR svsub_impl ()
     : rtx_code_function (MINUS, MINUS, UNSPEC_COND_FSUB) {}
 
   rtx
@@ -2304,7 +2304,7 @@ public:
 class svtrn_impl : public binary_permute
 {
 public:
-  constexpr svtrn_impl (int base)
+  CONSTEXPR svtrn_impl (int base)
     : binary_permute (base ? UNSPEC_TRN2 : UNSPEC_TRN1), m_base (base) {}
 
   gimple *
@@ -2345,7 +2345,7 @@ public:
 class svunpk_impl : public quiet<function_base>
 {
 public:
-  constexpr svunpk_impl (bool high_p) : m_high_p (high_p) {}
+  CONSTEXPR svunpk_impl (bool high_p) : m_high_p (high_p) {}
 
   gimple *
   fold (gimple_folder &f) const override
@@ -2387,7 +2387,7 @@ public:
 class svusdot_impl : public function_base
 {
 public:
-  constexpr svusdot_impl (bool su) : m_su (su) {}
+  CONSTEXPR svusdot_impl (bool su) : m_su (su) {}
 
   rtx
   expand (function_expander &e) const override
@@ -2415,7 +2415,7 @@ private:
 class svuzp_impl : public binary_permute
 {
 public:
-  constexpr svuzp_impl (unsigned int base)
+  CONSTEXPR svuzp_impl (unsigned int base)
     : binary_permute (base ? UNSPEC_UZP2 : UNSPEC_UZP1), m_base (base) {}
 
   gimple *
@@ -2438,7 +2438,7 @@ public:
 class svwhilelx_impl : public while_comparison
 {
 public:
-  constexpr svwhilelx_impl (int unspec_for_sint, int unspec_for_uint, bool eq_p)
+  CONSTEXPR svwhilelx_impl (int unspec_for_sint, int unspec_for_uint, bool eq_p)
     : while_comparison (unspec_for_sint, unspec_for_uint), m_eq_p (eq_p)
   {}
 
@@ -2525,7 +2525,7 @@ public:
 class svzip_impl : public binary_permute
 {
 public:
-  constexpr svzip_impl (unsigned int base)
+  CONSTEXPR svzip_impl (unsigned int base)
     : binary_permute (base ? UNSPEC_ZIP2 : UNSPEC_ZIP1), m_base (base) {}
 
   gimple *
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-functions.h b/gcc/config/aarch64/aarch64-sve-builtins-functions.h
index ec943c53a35..472e26c17ff 100644
--- a/gcc/config/aarch64/aarch64-sve-builtins-functions.h
+++ b/gcc/config/aarch64/aarch64-sve-builtins-functions.h
@@ -44,7 +44,7 @@ public:
 class multi_vector_function : public function_base
 {
 public:
-  constexpr multi_vector_function (unsigned int vectors_per_tuple)
+  CONSTEXPR multi_vector_function (unsigned int vectors_per_tuple)
     : m_vectors_per_tuple (vectors_per_tuple) {}
 
   unsigned int
@@ -63,7 +63,7 @@ public:
 class full_width_access : public multi_vector_function
 {
 public:
-  constexpr full_width_access (unsigned int vectors_per_tuple = 1)
+  CONSTEXPR full_width_access (unsigned int vectors_per_tuple = 1)
     : multi_vector_function (vectors_per_tuple) {}
 
   tree
@@ -88,7 +88,7 @@ public:
 class extending_load : public function_base
 {
 public:
-  constexpr extending_load (type_suffix_index memory_type)
+  CONSTEXPR extending_load (type_suffix_index memory_type)
     : m_memory_type (memory_type) {}
 
   unsigned int
@@ -131,7 +131,7 @@ public:
 class truncating_store : public function_base
 {
 public:
-  constexpr truncating_store (scalar_int_mode to_mode) : m_to_mode (to_mode) {}
+  CONSTEXPR truncating_store (scalar_int_mode to_mode) : m_to_mode (to_mode) {}
 
   unsigned int
   call_properties (const function_instance &) const override
@@ -168,7 +168,7 @@ public:
 class rtx_code_function_base : public function_base
 {
 public:
-  constexpr rtx_code_function_base (rtx_code code_for_sint,
+  CONSTEXPR rtx_code_function_base (rtx_code code_for_sint,
 				    rtx_code code_for_uint,
 				    int unspec_for_fp = -1)
     : m_code_for_sint (code_for_sint), m_code_for_uint (code_for_uint),
@@ -227,7 +227,7 @@ public:
 class unspec_based_function_base : public function_base
 {
 public:
-  constexpr unspec_based_function_base (int unspec_for_sint,
+  CONSTEXPR unspec_based_function_base (int unspec_for_sint,
 					int unspec_for_uint,
 					int unspec_for_fp)
     : m_unspec_for_sint (unspec_for_sint),
@@ -434,7 +434,7 @@ public:
 class fixed_insn_function : public function_base
 {
 public:
-  constexpr fixed_insn_function (insn_code code) : m_code (code) {}
+  CONSTEXPR fixed_insn_function (insn_code code) : m_code (code) {}
 
   rtx
   expand (function_expander &e) const override
@@ -476,7 +476,7 @@ public:
 class binary_permute : public permute
 {
 public:
-  constexpr binary_permute (int unspec) : m_unspec (unspec) {}
+  CONSTEXPR binary_permute (int unspec) : m_unspec (unspec) {}
 
   rtx
   expand (function_expander &e) const override
@@ -493,13 +493,13 @@ public:
 class reduction : public function_base
 {
 public:
-  constexpr reduction (int unspec)
+  CONSTEXPR reduction (int unspec)
     : m_unspec_for_sint (unspec),
       m_unspec_for_uint (unspec),
       m_unspec_for_fp (unspec)
   {}
 
-  constexpr reduction (int unspec_for_sint, int unspec_for_uint,
+  CONSTEXPR reduction (int unspec_for_sint, int unspec_for_uint,
 		       int unspec_for_fp)
     : m_unspec_for_sint (unspec_for_sint),
       m_unspec_for_uint (unspec_for_uint),
@@ -532,7 +532,7 @@ public:
 class shift_wide : public function_base
 {
 public:
-  constexpr shift_wide (rtx_code code, int wide_unspec)
+  CONSTEXPR shift_wide (rtx_code code, int wide_unspec)
     : m_code (code), m_wide_unspec (wide_unspec) {}
 
   rtx
@@ -567,7 +567,7 @@ public:
 class unary_count : public quiet<function_base>
 {
 public:
-  constexpr unary_count (rtx_code code) : m_code (code) {}
+  CONSTEXPR unary_count (rtx_code code) : m_code (code) {}
 
   rtx
   expand (function_expander &e) const override
@@ -590,7 +590,7 @@ public:
 class while_comparison : public function_base
 {
 public:
-  constexpr while_comparison (int unspec_for_sint, int unspec_for_uint)
+  CONSTEXPR while_comparison (int unspec_for_sint, int unspec_for_uint)
     : m_unspec_for_sint (unspec_for_sint),
       m_unspec_for_uint (unspec_for_uint)
   {}
@@ -619,7 +619,7 @@ public:
 /* Declare the global function base NAME, creating it from an instance
    of class CLASS with constructor arguments ARGS.  */
 #define FUNCTION(NAME, CLASS, ARGS) \
-  namespace { static constexpr const CLASS NAME##_obj ARGS; } \
+  namespace { static CONSTEXPR const CLASS NAME##_obj ARGS; } \
   namespace functions { const function_base *const NAME = &NAME##_obj; }
 
 #endif
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-shapes.cc b/gcc/config/aarch64/aarch64-sve-builtins-shapes.cc
index bf1d05e5b8c..8e26bd8a60f 100644
--- a/gcc/config/aarch64/aarch64-sve-builtins-shapes.cc
+++ b/gcc/config/aarch64/aarch64-sve-builtins-shapes.cc
@@ -447,7 +447,7 @@ long_type_suffix (function_resolver &r, type_suffix_index type)
 /* Declare the function shape NAME, pointing it to an instance
    of class <NAME>_def.  */
 #define SHAPE(NAME) \
-  static constexpr const NAME##_def NAME##_obj; \
+  static CONSTEXPR const NAME##_def NAME##_obj; \
   namespace shapes { const function_shape *const NAME = &NAME##_obj; }
 
 /* Base class for functions that are not overloaded.  */
@@ -587,7 +587,7 @@ struct binary_imm_long_base : public overloaded_base<0>
 /* Base class for inc_dec and inc_dec_pat.  */
 struct inc_dec_base : public overloaded_base<0>
 {
-  constexpr inc_dec_base (bool pat_p) : m_pat_p (pat_p) {}
+  CONSTEXPR inc_dec_base (bool pat_p) : m_pat_p (pat_p) {}
 
   /* Resolve based on the first argument only, which must be either a
      scalar or a vector.  If it's a scalar, it must be a 32-bit or
@@ -1924,7 +1924,7 @@ SHAPE (get)
    whose size is tied to the [bhwd] suffix of "svfoo".  */
 struct inc_dec_def : public inc_dec_base
 {
-  constexpr inc_dec_def () : inc_dec_base (false) {}
+  CONSTEXPR inc_dec_def () : inc_dec_base (false) {}
 
   void
   build (function_builder &b, const function_group_info &group) const override
@@ -1949,7 +1949,7 @@ SHAPE (inc_dec)
    whose size is tied to the [bhwd] suffix of "svfoo".  */
 struct inc_dec_pat_def : public inc_dec_base
 {
-  constexpr inc_dec_pat_def () : inc_dec_base (true) {}
+  CONSTEXPR inc_dec_pat_def () : inc_dec_base (true) {}
 
   void
   build (function_builder &b, const function_group_info &group) const override
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-sve2.cc b/gcc/config/aarch64/aarch64-sve-builtins-sve2.cc
index ca8f20db57e..a7d7435afda 100644
--- a/gcc/config/aarch64/aarch64-sve-builtins-sve2.cc
+++ b/gcc/config/aarch64/aarch64-sve-builtins-sve2.cc
@@ -158,7 +158,7 @@ public:
 class svmatch_svnmatch_impl : public function_base
 {
 public:
-  constexpr svmatch_svnmatch_impl (int unspec) : m_unspec (unspec) {}
+  CONSTEXPR svmatch_svnmatch_impl (int unspec) : m_unspec (unspec) {}
 
   rtx
   expand (function_expander &e) const override
@@ -233,7 +233,7 @@ public:
 class svqrshl_impl : public unspec_based_function
 {
 public:
-  constexpr svqrshl_impl ()
+  CONSTEXPR svqrshl_impl ()
     : unspec_based_function (UNSPEC_SQRSHL, UNSPEC_UQRSHL, -1) {}
 
   gimple *
@@ -267,7 +267,7 @@ public:
 class svqshl_impl : public unspec_based_function
 {
 public:
-  constexpr svqshl_impl ()
+  CONSTEXPR svqshl_impl ()
     : unspec_based_function (UNSPEC_SQSHL, UNSPEC_UQSHL, -1) {}
 
   gimple *
@@ -303,7 +303,7 @@ public:
 class svrshl_impl : public unspec_based_function
 {
 public:
-  constexpr svrshl_impl ()
+  CONSTEXPR svrshl_impl ()
     : unspec_based_function (UNSPEC_SRSHL, UNSPEC_URSHL, -1) {}
 
   gimple *
@@ -403,7 +403,7 @@ public:
 class svtbl2_impl : public quiet<multi_vector_function>
 {
 public:
-  constexpr svtbl2_impl () : quiet<multi_vector_function> (2) {}
+  CONSTEXPR svtbl2_impl () : quiet<multi_vector_function> (2) {}
 
   rtx
   expand (function_expander &e) const override
@@ -431,7 +431,7 @@ public:
 class svwhilerw_svwhilewr_impl : public full_width_access
 {
 public:
-  constexpr svwhilerw_svwhilewr_impl (int unspec) : m_unspec (unspec) {}
+  CONSTEXPR svwhilerw_svwhilewr_impl (int unspec) : m_unspec (unspec) {}
 
   rtx
   expand (function_expander &e) const override
diff --git a/gcc/config/aarch64/aarch64-sve-builtins.cc b/gcc/config/aarch64/aarch64-sve-builtins.cc
index 37228f6389a..e168c83344a 100644
--- a/gcc/config/aarch64/aarch64-sve-builtins.cc
+++ b/gcc/config/aarch64/aarch64-sve-builtins.cc
@@ -99,7 +99,7 @@ struct registered_function_hasher : nofree_ptr_hash <registered_function>
 };
 
 /* Information about each single-predicate or single-vector type.  */
-static constexpr const vector_type_info vector_types[] = {
+static CONSTEXPR const vector_type_info vector_types[] = {
 #define DEF_SVE_TYPE(ACLE_NAME, NCHARS, ABI_NAME, SCALAR_TYPE) \
   { #ACLE_NAME, #ABI_NAME, "u" #NCHARS #ABI_NAME },
 #include "aarch64-sve-builtins.def"
@@ -116,7 +116,7 @@ static const char *const pred_suffixes[NUM_PREDS + 1] = {
 };
 
 /* Static information about each mode_suffix_index.  */
-constexpr const mode_suffix_info mode_suffixes[] = {
+CONSTEXPR const mode_suffix_info mode_suffixes[] = {
 #define VECTOR_TYPE_none NUM_VECTOR_TYPES
 #define DEF_SVE_MODE(NAME, BASE, DISPLACEMENT, UNITS) \
   { "_" #NAME, VECTOR_TYPE_##BASE, VECTOR_TYPE_##DISPLACEMENT, UNITS_##UNITS },
@@ -126,7 +126,7 @@ constexpr const mode_suffix_info mode_suffixes[] = {
 };
 
 /* Static information about each type_suffix_index.  */
-constexpr const type_suffix_info type_suffixes[NUM_TYPE_SUFFIXES + 1] = {
+CONSTEXPR const type_suffix_info type_suffixes[NUM_TYPE_SUFFIXES + 1] = {
 #define DEF_SVE_TYPE_SUFFIX(NAME, ACLE_TYPE, CLASS, BITS, MODE) \
   { "_" #NAME, \
     VECTOR_TYPE_##ACLE_TYPE, \
@@ -522,7 +522,7 @@ static const predication_index preds_z_or_none[] = {
 static const predication_index preds_z[] = { PRED_z, NUM_PREDS };
 
 /* A list of all SVE ACLE functions.  */
-static constexpr const function_group_info function_groups[] = {
+static CONSTEXPR const function_group_info function_groups[] = {
 #define DEF_SVE_FUNCTION(NAME, SHAPE, TYPES, PREDS) \
   { #NAME, &functions::NAME, &shapes::SHAPE, types_##TYPES, preds_##PREDS, \
     REQUIRED_EXTENSIONS | AARCH64_FL_SVE },
diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
index 5d1ab5aa42b..0458c65db81 100644
--- a/gcc/config/aarch64/aarch64.cc
+++ b/gcc/config/aarch64/aarch64.cc
@@ -2679,7 +2679,7 @@ struct processor
 };
 
 /* Architectures implementing AArch64.  */
-static constexpr processor all_architectures[] =
+static CONSTEXPR const processor all_architectures[] =
 {
 #define AARCH64_ARCH(NAME, CORE, ARCH_IDENT, D, E) \
   {NAME, CORE, CORE, AARCH64_ARCH_##ARCH_IDENT, \
diff --git a/gcc/config/aarch64/driver-aarch64.cc b/gcc/config/aarch64/driver-aarch64.cc
index 2ae47c020d3..a1d412cb7b4 100644
--- a/gcc/config/aarch64/driver-aarch64.cc
+++ b/gcc/config/aarch64/driver-aarch64.cc
@@ -64,7 +64,7 @@ struct aarch64_core_data
 #define AARCH64_CORE(CORE_NAME, CORE_IDENT, SCHED, ARCH, FLAGS, COSTS, IMP, PART, VARIANT) \
   { CORE_NAME, #ARCH, IMP, PART, VARIANT, feature_deps::cpu_##CORE_IDENT },
 
-static constexpr aarch64_core_data aarch64_cpu_data[] =
+static CONSTEXPR const aarch64_core_data aarch64_cpu_data[] =
 {
 #include "aarch64-cores.def"
   { NULL, NULL, INVALID_IMP, INVALID_CORE, ALL_VARIANTS, 0 }
@@ -82,7 +82,7 @@ struct aarch64_arch_driver_info
 #define AARCH64_ARCH(NAME, CORE, ARCH_IDENT, ARCH_REV, FLAGS) \
   { #ARCH_IDENT + 1, NAME, feature_deps::ARCH_IDENT ().enable },
 
-static constexpr aarch64_arch_driver_info aarch64_arches[] =
+static CONSTEXPR const aarch64_arch_driver_info aarch64_arches[] =
 {
 #include "aarch64-arches.def"
   {NULL, NULL, 0}

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

only message in thread, other threads:[~2022-10-27 13:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-27 13:20 [gcc r13-3526] aarch64: Reinstate some uses of CONSTEXPR Richard Sandiford

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).