diff mbox series

i386: Avoid C++ global constructors in every object that includes i386.h

Message ID 20210217100542.GK4020736@tucnak
State New
Headers show
Series i386: Avoid C++ global constructors in every object that includes i386.h | expand

Commit Message

Jakub Jelinek Feb. 17, 2021, 10:05 a.m. UTC
Hi!

When looking at recog.o when working on the recog.[ch] changes to make sure
I have not introduced runtime construction of recog_data variable, I have
noticed that at least in unoptimized build, every single *.o file that
included i386.h has lots of runtime constructors for all the PTA_*
variables.

As we now require C++11, the following patch makes those constexpr so that
they don't need runtime initialization.
I've verified that ~ 8276 bytes long _Z41__static_initialization_and_destruction_0ii
at -O0 is gone from every *.o that included i386.h (and doesn't really need
any global ctors anymore).

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

2021-02-17  Jakub Jelinek  <jakub@redhat.com>

	* wide-int-bitmask.h (wide_int_bitmask::wide_int_bitmask (),
	wide_int_bitmask::wide_int_bitmask (uint64_t),
	wide_int_bitmask::wide_int_bitmask (uint64_t, uint64_t),
	wide_int_bitmask::operator ~ () const,
	wide_int_bitmask::operator | (wide_int_bitmask) const,
	wide_int_bitmask::operator & (wide_int_bitmask) const): Use constexpr
	instead of inline.
	* config/i386/i386.h (PTA_3DNOW, PTA_3DNOW_A, PTA_64BIT, PTA_ABM,
	PTA_AES, PTA_AVX, PTA_BMI, PTA_CX16, PTA_F16C, PTA_FMA, PTA_FMA4,
	PTA_FSGSBASE, PTA_LWP, PTA_LZCNT, PTA_MMX, PTA_MOVBE, PTA_NO_SAHF,
	PTA_PCLMUL, PTA_POPCNT, PTA_PREFETCH_SSE, PTA_RDRND, PTA_SSE, PTA_SSE2,
	PTA_SSE3, PTA_SSE4_1, PTA_SSE4_2, PTA_SSE4A, PTA_SSSE3, PTA_TBM,
	PTA_XOP, PTA_AVX2, PTA_BMI2, PTA_RTM, PTA_HLE, PTA_PRFCHW, PTA_RDSEED,
	PTA_ADX, PTA_FXSR, PTA_XSAVE, PTA_XSAVEOPT, PTA_AVX512F, PTA_AVX512ER,
	PTA_AVX512PF, PTA_AVX512CD, PTA_NO_TUNE, PTA_SHA, PTA_PREFETCHWT1,
	PTA_CLFLUSHOPT, PTA_XSAVEC, PTA_XSAVES, PTA_AVX512DQ, PTA_AVX512BW,
	PTA_AVX512VL, PTA_AVX512IFMA, PTA_AVX512VBMI, PTA_CLWB, PTA_MWAITX,
	PTA_CLZERO, PTA_NO_80387, PTA_PKU, PTA_AVX5124VNNIW, PTA_AVX5124FMAPS,
	PTA_AVX512VPOPCNTDQ, PTA_SGX, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES,
	PTA_AVX512VBMI2, PTA_VPCLMULQDQ, PTA_AVX512BITALG, PTA_RDPID,
	PTA_PCONFIG, PTA_WBNOINVD, PTA_AVX512VP2INTERSECT, PTA_PTWRITE,
	PTA_AVX512BF16, PTA_WAITPKG, PTA_MOVDIRI, PTA_MOVDIR64B, PTA_ENQCMD,
	PTA_CLDEMOTE, PTA_SERIALIZE, PTA_TSXLDTRK, PTA_AMX_TILE, PTA_AMX_INT8,
	PTA_AMX_BF16, PTA_UINTR, PTA_HRESET, PTA_KL, PTA_WIDEKL, PTA_AVXVNNI,
	PTA_X86_64_BASELINE, PTA_X86_64_V2, PTA_X86_64_V3, PTA_X86_64_V4,
	PTA_CORE2, PTA_NEHALEM, PTA_WESTMERE, PTA_SANDYBRIDGE, PTA_IVYBRIDGE,
	PTA_HASWELL, PTA_BROADWELL, PTA_SKYLAKE, PTA_SKYLAKE_AVX512,
	PTA_CASCADELAKE, PTA_COOPERLAKE, PTA_CANNONLAKE, PTA_ICELAKE_CLIENT,
	PTA_ICELAKE_SERVER, PTA_TIGERLAKE, PTA_SAPPHIRERAPIDS, PTA_ALDERLAKE,
	PTA_KNL, PTA_BONNELL, PTA_SILVERMONT, PTA_GOLDMONT, PTA_GOLDMONT_PLUS,
	PTA_TREMONT, PTA_KNM): Use constexpr instead of const.


	Jakub

Comments

Richard Biener Feb. 18, 2021, 8:42 a.m. UTC | #1
On Wed, 17 Feb 2021, Jakub Jelinek wrote:

> Hi!
> 
> When looking at recog.o when working on the recog.[ch] changes to make sure
> I have not introduced runtime construction of recog_data variable, I have
> noticed that at least in unoptimized build, every single *.o file that
> included i386.h has lots of runtime constructors for all the PTA_*
> variables.
> 
> As we now require C++11, the following patch makes those constexpr so that
> they don't need runtime initialization.
> I've verified that ~ 8276 bytes long _Z41__static_initialization_and_destruction_0ii
> at -O0 is gone from every *.o that included i386.h (and doesn't really need
> any global ctors anymore).
> 
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

OK.  Can you quickly try whether GCC 4.8 is happy with it?

Thanks,
Richard.

> 2021-02-17  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* wide-int-bitmask.h (wide_int_bitmask::wide_int_bitmask (),
> 	wide_int_bitmask::wide_int_bitmask (uint64_t),
> 	wide_int_bitmask::wide_int_bitmask (uint64_t, uint64_t),
> 	wide_int_bitmask::operator ~ () const,
> 	wide_int_bitmask::operator | (wide_int_bitmask) const,
> 	wide_int_bitmask::operator & (wide_int_bitmask) const): Use constexpr
> 	instead of inline.
> 	* config/i386/i386.h (PTA_3DNOW, PTA_3DNOW_A, PTA_64BIT, PTA_ABM,
> 	PTA_AES, PTA_AVX, PTA_BMI, PTA_CX16, PTA_F16C, PTA_FMA, PTA_FMA4,
> 	PTA_FSGSBASE, PTA_LWP, PTA_LZCNT, PTA_MMX, PTA_MOVBE, PTA_NO_SAHF,
> 	PTA_PCLMUL, PTA_POPCNT, PTA_PREFETCH_SSE, PTA_RDRND, PTA_SSE, PTA_SSE2,
> 	PTA_SSE3, PTA_SSE4_1, PTA_SSE4_2, PTA_SSE4A, PTA_SSSE3, PTA_TBM,
> 	PTA_XOP, PTA_AVX2, PTA_BMI2, PTA_RTM, PTA_HLE, PTA_PRFCHW, PTA_RDSEED,
> 	PTA_ADX, PTA_FXSR, PTA_XSAVE, PTA_XSAVEOPT, PTA_AVX512F, PTA_AVX512ER,
> 	PTA_AVX512PF, PTA_AVX512CD, PTA_NO_TUNE, PTA_SHA, PTA_PREFETCHWT1,
> 	PTA_CLFLUSHOPT, PTA_XSAVEC, PTA_XSAVES, PTA_AVX512DQ, PTA_AVX512BW,
> 	PTA_AVX512VL, PTA_AVX512IFMA, PTA_AVX512VBMI, PTA_CLWB, PTA_MWAITX,
> 	PTA_CLZERO, PTA_NO_80387, PTA_PKU, PTA_AVX5124VNNIW, PTA_AVX5124FMAPS,
> 	PTA_AVX512VPOPCNTDQ, PTA_SGX, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES,
> 	PTA_AVX512VBMI2, PTA_VPCLMULQDQ, PTA_AVX512BITALG, PTA_RDPID,
> 	PTA_PCONFIG, PTA_WBNOINVD, PTA_AVX512VP2INTERSECT, PTA_PTWRITE,
> 	PTA_AVX512BF16, PTA_WAITPKG, PTA_MOVDIRI, PTA_MOVDIR64B, PTA_ENQCMD,
> 	PTA_CLDEMOTE, PTA_SERIALIZE, PTA_TSXLDTRK, PTA_AMX_TILE, PTA_AMX_INT8,
> 	PTA_AMX_BF16, PTA_UINTR, PTA_HRESET, PTA_KL, PTA_WIDEKL, PTA_AVXVNNI,
> 	PTA_X86_64_BASELINE, PTA_X86_64_V2, PTA_X86_64_V3, PTA_X86_64_V4,
> 	PTA_CORE2, PTA_NEHALEM, PTA_WESTMERE, PTA_SANDYBRIDGE, PTA_IVYBRIDGE,
> 	PTA_HASWELL, PTA_BROADWELL, PTA_SKYLAKE, PTA_SKYLAKE_AVX512,
> 	PTA_CASCADELAKE, PTA_COOPERLAKE, PTA_CANNONLAKE, PTA_ICELAKE_CLIENT,
> 	PTA_ICELAKE_SERVER, PTA_TIGERLAKE, PTA_SAPPHIRERAPIDS, PTA_ALDERLAKE,
> 	PTA_KNL, PTA_BONNELL, PTA_SILVERMONT, PTA_GOLDMONT, PTA_GOLDMONT_PLUS,
> 	PTA_TREMONT, PTA_KNM): Use constexpr instead of const.
> 
> --- gcc/wide-int-bitmask.h.jj	2021-01-04 10:25:38.611236338 +0100
> +++ gcc/wide-int-bitmask.h	2021-02-16 15:55:55.848542878 +0100
> @@ -23,14 +23,14 @@ along with GCC; see the file COPYING3.
>  class wide_int_bitmask
>  {
>  public:
> -  inline wide_int_bitmask ();
> -  inline wide_int_bitmask (uint64_t l);
> -  inline wide_int_bitmask (uint64_t l, uint64_t h);
> +  constexpr wide_int_bitmask ();
> +  constexpr wide_int_bitmask (uint64_t l);
> +  constexpr wide_int_bitmask (uint64_t l, uint64_t h);
>    inline wide_int_bitmask &operator &= (wide_int_bitmask);
>    inline wide_int_bitmask &operator |= (wide_int_bitmask);
> -  inline wide_int_bitmask operator ~ () const;
> -  inline wide_int_bitmask operator & (wide_int_bitmask) const;
> -  inline wide_int_bitmask operator | (wide_int_bitmask) const;
> +  constexpr wide_int_bitmask operator ~ () const;
> +  constexpr wide_int_bitmask operator & (wide_int_bitmask) const;
> +  constexpr wide_int_bitmask operator | (wide_int_bitmask) const;
>    inline wide_int_bitmask operator >> (int);
>    inline wide_int_bitmask operator << (int);
>    inline bool operator == (wide_int_bitmask) const;
> @@ -38,19 +38,19 @@ public:
>    uint64_t low, high;
>  };
>  
> -inline
> +constexpr
>  wide_int_bitmask::wide_int_bitmask ()
>  : low (0), high (0)
>  {
>  }
>  
> -inline
> +constexpr
>  wide_int_bitmask::wide_int_bitmask (uint64_t l)
>  : low (l), high (0)
>  {
>  }
>  
> -inline
> +constexpr
>  wide_int_bitmask::wide_int_bitmask (uint64_t l, uint64_t h)
>  : low (l), high (h)
>  {
> @@ -72,25 +72,22 @@ wide_int_bitmask::operator |= (wide_int_
>    return *this;
>  }
>  
> -inline wide_int_bitmask
> +constexpr wide_int_bitmask
>  wide_int_bitmask::operator ~ () const
>  {
> -  wide_int_bitmask ret (~low, ~high);
> -  return ret;
> +  return wide_int_bitmask (~low, ~high);
>  }
>  
> -inline wide_int_bitmask
> +constexpr wide_int_bitmask
>  wide_int_bitmask::operator | (wide_int_bitmask b) const
>  {
> -  wide_int_bitmask ret (low | b.low, high | b.high);
> -  return ret;
> +  return wide_int_bitmask (low | b.low, high | b.high);
>  }
>  
> -inline wide_int_bitmask
> +constexpr wide_int_bitmask
>  wide_int_bitmask::operator & (wide_int_bitmask b) const
>  {
> -  wide_int_bitmask ret (low & b.low, high & b.high);
> -  return ret;
> +  return wide_int_bitmask (low & b.low, high & b.high);
>  }
>  
>  inline wide_int_bitmask
> --- gcc/config/i386/i386.h.jj	2021-01-14 19:34:06.065425013 +0100
> +++ gcc/config/i386/i386.h	2021-02-16 15:58:57.272497497 +0100
> @@ -2391,157 +2391,160 @@ extern const char *const processor_names
>  
>  #include "wide-int-bitmask.h"
>  
> -const wide_int_bitmask PTA_3DNOW (HOST_WIDE_INT_1U << 0);
> -const wide_int_bitmask PTA_3DNOW_A (HOST_WIDE_INT_1U << 1);
> -const wide_int_bitmask PTA_64BIT (HOST_WIDE_INT_1U << 2);
> -const wide_int_bitmask PTA_ABM (HOST_WIDE_INT_1U << 3);
> -const wide_int_bitmask PTA_AES (HOST_WIDE_INT_1U << 4);
> -const wide_int_bitmask PTA_AVX (HOST_WIDE_INT_1U << 5);
> -const wide_int_bitmask PTA_BMI (HOST_WIDE_INT_1U << 6);
> -const wide_int_bitmask PTA_CX16 (HOST_WIDE_INT_1U << 7);
> -const wide_int_bitmask PTA_F16C (HOST_WIDE_INT_1U << 8);
> -const wide_int_bitmask PTA_FMA (HOST_WIDE_INT_1U << 9);
> -const wide_int_bitmask PTA_FMA4 (HOST_WIDE_INT_1U << 10);
> -const wide_int_bitmask PTA_FSGSBASE (HOST_WIDE_INT_1U << 11);
> -const wide_int_bitmask PTA_LWP (HOST_WIDE_INT_1U << 12);
> -const wide_int_bitmask PTA_LZCNT (HOST_WIDE_INT_1U << 13);
> -const wide_int_bitmask PTA_MMX (HOST_WIDE_INT_1U << 14);
> -const wide_int_bitmask PTA_MOVBE (HOST_WIDE_INT_1U << 15);
> -const wide_int_bitmask PTA_NO_SAHF (HOST_WIDE_INT_1U << 16);
> -const wide_int_bitmask PTA_PCLMUL (HOST_WIDE_INT_1U << 17);
> -const wide_int_bitmask PTA_POPCNT (HOST_WIDE_INT_1U << 18);
> -const wide_int_bitmask PTA_PREFETCH_SSE (HOST_WIDE_INT_1U << 19);
> -const wide_int_bitmask PTA_RDRND (HOST_WIDE_INT_1U << 20);
> -const wide_int_bitmask PTA_SSE (HOST_WIDE_INT_1U << 21);
> -const wide_int_bitmask PTA_SSE2 (HOST_WIDE_INT_1U << 22);
> -const wide_int_bitmask PTA_SSE3 (HOST_WIDE_INT_1U << 23);
> -const wide_int_bitmask PTA_SSE4_1 (HOST_WIDE_INT_1U << 24);
> -const wide_int_bitmask PTA_SSE4_2 (HOST_WIDE_INT_1U << 25);
> -const wide_int_bitmask PTA_SSE4A (HOST_WIDE_INT_1U << 26);
> -const wide_int_bitmask PTA_SSSE3 (HOST_WIDE_INT_1U << 27);
> -const wide_int_bitmask PTA_TBM (HOST_WIDE_INT_1U << 28);
> -const wide_int_bitmask PTA_XOP (HOST_WIDE_INT_1U << 29);
> -const wide_int_bitmask PTA_AVX2 (HOST_WIDE_INT_1U << 30);
> -const wide_int_bitmask PTA_BMI2 (HOST_WIDE_INT_1U << 31);
> -const wide_int_bitmask PTA_RTM (HOST_WIDE_INT_1U << 32);
> -const wide_int_bitmask PTA_HLE (HOST_WIDE_INT_1U << 33);
> -const wide_int_bitmask PTA_PRFCHW (HOST_WIDE_INT_1U << 34);
> -const wide_int_bitmask PTA_RDSEED (HOST_WIDE_INT_1U << 35);
> -const wide_int_bitmask PTA_ADX (HOST_WIDE_INT_1U << 36);
> -const wide_int_bitmask PTA_FXSR (HOST_WIDE_INT_1U << 37);
> -const wide_int_bitmask PTA_XSAVE (HOST_WIDE_INT_1U << 38);
> -const wide_int_bitmask PTA_XSAVEOPT (HOST_WIDE_INT_1U << 39);
> -const wide_int_bitmask PTA_AVX512F (HOST_WIDE_INT_1U << 40);
> -const wide_int_bitmask PTA_AVX512ER (HOST_WIDE_INT_1U << 41);
> -const wide_int_bitmask PTA_AVX512PF (HOST_WIDE_INT_1U << 42);
> -const wide_int_bitmask PTA_AVX512CD (HOST_WIDE_INT_1U << 43);
> -const wide_int_bitmask PTA_NO_TUNE (HOST_WIDE_INT_1U << 44);
> -const wide_int_bitmask PTA_SHA (HOST_WIDE_INT_1U << 45);
> -const wide_int_bitmask PTA_PREFETCHWT1 (HOST_WIDE_INT_1U << 46);
> -const wide_int_bitmask PTA_CLFLUSHOPT (HOST_WIDE_INT_1U << 47);
> -const wide_int_bitmask PTA_XSAVEC (HOST_WIDE_INT_1U << 48);
> -const wide_int_bitmask PTA_XSAVES (HOST_WIDE_INT_1U << 49);
> -const wide_int_bitmask PTA_AVX512DQ (HOST_WIDE_INT_1U << 50);
> -const wide_int_bitmask PTA_AVX512BW (HOST_WIDE_INT_1U << 51);
> -const wide_int_bitmask PTA_AVX512VL (HOST_WIDE_INT_1U << 52);
> -const wide_int_bitmask PTA_AVX512IFMA (HOST_WIDE_INT_1U << 53);
> -const wide_int_bitmask PTA_AVX512VBMI (HOST_WIDE_INT_1U << 54);
> -const wide_int_bitmask PTA_CLWB (HOST_WIDE_INT_1U << 55);
> -const wide_int_bitmask PTA_MWAITX (HOST_WIDE_INT_1U << 56);
> -const wide_int_bitmask PTA_CLZERO (HOST_WIDE_INT_1U << 57);
> -const wide_int_bitmask PTA_NO_80387 (HOST_WIDE_INT_1U << 58);
> -const wide_int_bitmask PTA_PKU (HOST_WIDE_INT_1U << 59);
> -const wide_int_bitmask PTA_AVX5124VNNIW (HOST_WIDE_INT_1U << 60);
> -const wide_int_bitmask PTA_AVX5124FMAPS (HOST_WIDE_INT_1U << 61);
> -const wide_int_bitmask PTA_AVX512VPOPCNTDQ (HOST_WIDE_INT_1U << 62);
> -const wide_int_bitmask PTA_SGX (HOST_WIDE_INT_1U << 63);
> -const wide_int_bitmask PTA_AVX512VNNI (0, HOST_WIDE_INT_1U);
> -const wide_int_bitmask PTA_GFNI (0, HOST_WIDE_INT_1U << 1);
> -const wide_int_bitmask PTA_VAES (0, HOST_WIDE_INT_1U << 2);
> -const wide_int_bitmask PTA_AVX512VBMI2 (0, HOST_WIDE_INT_1U << 3);
> -const wide_int_bitmask PTA_VPCLMULQDQ (0, HOST_WIDE_INT_1U << 4);
> -const wide_int_bitmask PTA_AVX512BITALG (0, HOST_WIDE_INT_1U << 5);
> -const wide_int_bitmask PTA_RDPID (0, HOST_WIDE_INT_1U << 6);
> -const wide_int_bitmask PTA_PCONFIG (0, HOST_WIDE_INT_1U << 7);
> -const wide_int_bitmask PTA_WBNOINVD (0, HOST_WIDE_INT_1U << 8);
> -const wide_int_bitmask PTA_AVX512VP2INTERSECT (0, HOST_WIDE_INT_1U << 9);
> -const wide_int_bitmask PTA_PTWRITE (0, HOST_WIDE_INT_1U << 10);
> -const wide_int_bitmask PTA_AVX512BF16 (0, HOST_WIDE_INT_1U << 11);
> -const wide_int_bitmask PTA_WAITPKG (0, HOST_WIDE_INT_1U << 12);
> -const wide_int_bitmask PTA_MOVDIRI (0, HOST_WIDE_INT_1U << 13);
> -const wide_int_bitmask PTA_MOVDIR64B (0, HOST_WIDE_INT_1U << 14);
> -const wide_int_bitmask PTA_ENQCMD (0, HOST_WIDE_INT_1U << 15);
> -const wide_int_bitmask PTA_CLDEMOTE (0, HOST_WIDE_INT_1U << 16);
> -const wide_int_bitmask PTA_SERIALIZE (0, HOST_WIDE_INT_1U << 17);
> -const wide_int_bitmask PTA_TSXLDTRK (0, HOST_WIDE_INT_1U << 18);
> -const wide_int_bitmask PTA_AMX_TILE (0, HOST_WIDE_INT_1U << 19);
> -const wide_int_bitmask PTA_AMX_INT8 (0, HOST_WIDE_INT_1U << 20);
> -const wide_int_bitmask PTA_AMX_BF16 (0, HOST_WIDE_INT_1U << 21);
> -const wide_int_bitmask PTA_UINTR (0, HOST_WIDE_INT_1U << 22);
> -const wide_int_bitmask PTA_HRESET (0, HOST_WIDE_INT_1U << 23);
> -const wide_int_bitmask PTA_KL (0, HOST_WIDE_INT_1U << 24);
> -const wide_int_bitmask PTA_WIDEKL (0, HOST_WIDE_INT_1U << 25);
> -const wide_int_bitmask PTA_AVXVNNI (0, HOST_WIDE_INT_1U << 26);
> +constexpr wide_int_bitmask PTA_3DNOW (HOST_WIDE_INT_1U << 0);
> +constexpr wide_int_bitmask PTA_3DNOW_A (HOST_WIDE_INT_1U << 1);
> +constexpr wide_int_bitmask PTA_64BIT (HOST_WIDE_INT_1U << 2);
> +constexpr wide_int_bitmask PTA_ABM (HOST_WIDE_INT_1U << 3);
> +constexpr wide_int_bitmask PTA_AES (HOST_WIDE_INT_1U << 4);
> +constexpr wide_int_bitmask PTA_AVX (HOST_WIDE_INT_1U << 5);
> +constexpr wide_int_bitmask PTA_BMI (HOST_WIDE_INT_1U << 6);
> +constexpr wide_int_bitmask PTA_CX16 (HOST_WIDE_INT_1U << 7);
> +constexpr wide_int_bitmask PTA_F16C (HOST_WIDE_INT_1U << 8);
> +constexpr wide_int_bitmask PTA_FMA (HOST_WIDE_INT_1U << 9);
> +constexpr wide_int_bitmask PTA_FMA4 (HOST_WIDE_INT_1U << 10);
> +constexpr wide_int_bitmask PTA_FSGSBASE (HOST_WIDE_INT_1U << 11);
> +constexpr wide_int_bitmask PTA_LWP (HOST_WIDE_INT_1U << 12);
> +constexpr wide_int_bitmask PTA_LZCNT (HOST_WIDE_INT_1U << 13);
> +constexpr wide_int_bitmask PTA_MMX (HOST_WIDE_INT_1U << 14);
> +constexpr wide_int_bitmask PTA_MOVBE (HOST_WIDE_INT_1U << 15);
> +constexpr wide_int_bitmask PTA_NO_SAHF (HOST_WIDE_INT_1U << 16);
> +constexpr wide_int_bitmask PTA_PCLMUL (HOST_WIDE_INT_1U << 17);
> +constexpr wide_int_bitmask PTA_POPCNT (HOST_WIDE_INT_1U << 18);
> +constexpr wide_int_bitmask PTA_PREFETCH_SSE (HOST_WIDE_INT_1U << 19);
> +constexpr wide_int_bitmask PTA_RDRND (HOST_WIDE_INT_1U << 20);
> +constexpr wide_int_bitmask PTA_SSE (HOST_WIDE_INT_1U << 21);
> +constexpr wide_int_bitmask PTA_SSE2 (HOST_WIDE_INT_1U << 22);
> +constexpr wide_int_bitmask PTA_SSE3 (HOST_WIDE_INT_1U << 23);
> +constexpr wide_int_bitmask PTA_SSE4_1 (HOST_WIDE_INT_1U << 24);
> +constexpr wide_int_bitmask PTA_SSE4_2 (HOST_WIDE_INT_1U << 25);
> +constexpr wide_int_bitmask PTA_SSE4A (HOST_WIDE_INT_1U << 26);
> +constexpr wide_int_bitmask PTA_SSSE3 (HOST_WIDE_INT_1U << 27);
> +constexpr wide_int_bitmask PTA_TBM (HOST_WIDE_INT_1U << 28);
> +constexpr wide_int_bitmask PTA_XOP (HOST_WIDE_INT_1U << 29);
> +constexpr wide_int_bitmask PTA_AVX2 (HOST_WIDE_INT_1U << 30);
> +constexpr wide_int_bitmask PTA_BMI2 (HOST_WIDE_INT_1U << 31);
> +constexpr wide_int_bitmask PTA_RTM (HOST_WIDE_INT_1U << 32);
> +constexpr wide_int_bitmask PTA_HLE (HOST_WIDE_INT_1U << 33);
> +constexpr wide_int_bitmask PTA_PRFCHW (HOST_WIDE_INT_1U << 34);
> +constexpr wide_int_bitmask PTA_RDSEED (HOST_WIDE_INT_1U << 35);
> +constexpr wide_int_bitmask PTA_ADX (HOST_WIDE_INT_1U << 36);
> +constexpr wide_int_bitmask PTA_FXSR (HOST_WIDE_INT_1U << 37);
> +constexpr wide_int_bitmask PTA_XSAVE (HOST_WIDE_INT_1U << 38);
> +constexpr wide_int_bitmask PTA_XSAVEOPT (HOST_WIDE_INT_1U << 39);
> +constexpr wide_int_bitmask PTA_AVX512F (HOST_WIDE_INT_1U << 40);
> +constexpr wide_int_bitmask PTA_AVX512ER (HOST_WIDE_INT_1U << 41);
> +constexpr wide_int_bitmask PTA_AVX512PF (HOST_WIDE_INT_1U << 42);
> +constexpr wide_int_bitmask PTA_AVX512CD (HOST_WIDE_INT_1U << 43);
> +constexpr wide_int_bitmask PTA_NO_TUNE (HOST_WIDE_INT_1U << 44);
> +constexpr wide_int_bitmask PTA_SHA (HOST_WIDE_INT_1U << 45);
> +constexpr wide_int_bitmask PTA_PREFETCHWT1 (HOST_WIDE_INT_1U << 46);
> +constexpr wide_int_bitmask PTA_CLFLUSHOPT (HOST_WIDE_INT_1U << 47);
> +constexpr wide_int_bitmask PTA_XSAVEC (HOST_WIDE_INT_1U << 48);
> +constexpr wide_int_bitmask PTA_XSAVES (HOST_WIDE_INT_1U << 49);
> +constexpr wide_int_bitmask PTA_AVX512DQ (HOST_WIDE_INT_1U << 50);
> +constexpr wide_int_bitmask PTA_AVX512BW (HOST_WIDE_INT_1U << 51);
> +constexpr wide_int_bitmask PTA_AVX512VL (HOST_WIDE_INT_1U << 52);
> +constexpr wide_int_bitmask PTA_AVX512IFMA (HOST_WIDE_INT_1U << 53);
> +constexpr wide_int_bitmask PTA_AVX512VBMI (HOST_WIDE_INT_1U << 54);
> +constexpr wide_int_bitmask PTA_CLWB (HOST_WIDE_INT_1U << 55);
> +constexpr wide_int_bitmask PTA_MWAITX (HOST_WIDE_INT_1U << 56);
> +constexpr wide_int_bitmask PTA_CLZERO (HOST_WIDE_INT_1U << 57);
> +constexpr wide_int_bitmask PTA_NO_80387 (HOST_WIDE_INT_1U << 58);
> +constexpr wide_int_bitmask PTA_PKU (HOST_WIDE_INT_1U << 59);
> +constexpr wide_int_bitmask PTA_AVX5124VNNIW (HOST_WIDE_INT_1U << 60);
> +constexpr wide_int_bitmask PTA_AVX5124FMAPS (HOST_WIDE_INT_1U << 61);
> +constexpr wide_int_bitmask PTA_AVX512VPOPCNTDQ (HOST_WIDE_INT_1U << 62);
> +constexpr wide_int_bitmask PTA_SGX (HOST_WIDE_INT_1U << 63);
> +constexpr wide_int_bitmask PTA_AVX512VNNI (0, HOST_WIDE_INT_1U);
> +constexpr wide_int_bitmask PTA_GFNI (0, HOST_WIDE_INT_1U << 1);
> +constexpr wide_int_bitmask PTA_VAES (0, HOST_WIDE_INT_1U << 2);
> +constexpr wide_int_bitmask PTA_AVX512VBMI2 (0, HOST_WIDE_INT_1U << 3);
> +constexpr wide_int_bitmask PTA_VPCLMULQDQ (0, HOST_WIDE_INT_1U << 4);
> +constexpr wide_int_bitmask PTA_AVX512BITALG (0, HOST_WIDE_INT_1U << 5);
> +constexpr wide_int_bitmask PTA_RDPID (0, HOST_WIDE_INT_1U << 6);
> +constexpr wide_int_bitmask PTA_PCONFIG (0, HOST_WIDE_INT_1U << 7);
> +constexpr wide_int_bitmask PTA_WBNOINVD (0, HOST_WIDE_INT_1U << 8);
> +constexpr wide_int_bitmask PTA_AVX512VP2INTERSECT (0, HOST_WIDE_INT_1U << 9);
> +constexpr wide_int_bitmask PTA_PTWRITE (0, HOST_WIDE_INT_1U << 10);
> +constexpr wide_int_bitmask PTA_AVX512BF16 (0, HOST_WIDE_INT_1U << 11);
> +constexpr wide_int_bitmask PTA_WAITPKG (0, HOST_WIDE_INT_1U << 12);
> +constexpr wide_int_bitmask PTA_MOVDIRI (0, HOST_WIDE_INT_1U << 13);
> +constexpr wide_int_bitmask PTA_MOVDIR64B (0, HOST_WIDE_INT_1U << 14);
> +constexpr wide_int_bitmask PTA_ENQCMD (0, HOST_WIDE_INT_1U << 15);
> +constexpr wide_int_bitmask PTA_CLDEMOTE (0, HOST_WIDE_INT_1U << 16);
> +constexpr wide_int_bitmask PTA_SERIALIZE (0, HOST_WIDE_INT_1U << 17);
> +constexpr wide_int_bitmask PTA_TSXLDTRK (0, HOST_WIDE_INT_1U << 18);
> +constexpr wide_int_bitmask PTA_AMX_TILE (0, HOST_WIDE_INT_1U << 19);
> +constexpr wide_int_bitmask PTA_AMX_INT8 (0, HOST_WIDE_INT_1U << 20);
> +constexpr wide_int_bitmask PTA_AMX_BF16 (0, HOST_WIDE_INT_1U << 21);
> +constexpr wide_int_bitmask PTA_UINTR (0, HOST_WIDE_INT_1U << 22);
> +constexpr wide_int_bitmask PTA_HRESET (0, HOST_WIDE_INT_1U << 23);
> +constexpr wide_int_bitmask PTA_KL (0, HOST_WIDE_INT_1U << 24);
> +constexpr wide_int_bitmask PTA_WIDEKL (0, HOST_WIDE_INT_1U << 25);
> +constexpr wide_int_bitmask PTA_AVXVNNI (0, HOST_WIDE_INT_1U << 26);
>  
> -const wide_int_bitmask PTA_X86_64_BASELINE = PTA_64BIT | PTA_MMX | PTA_SSE
> +constexpr wide_int_bitmask PTA_X86_64_BASELINE = PTA_64BIT | PTA_MMX | PTA_SSE
>    | PTA_SSE2 | PTA_NO_SAHF | PTA_FXSR;
> -const wide_int_bitmask PTA_X86_64_V2 = (PTA_X86_64_BASELINE & (~PTA_NO_SAHF))
> +constexpr wide_int_bitmask PTA_X86_64_V2 = (PTA_X86_64_BASELINE
> +					    & (~PTA_NO_SAHF))
>    | PTA_CX16 | PTA_POPCNT | PTA_SSE3 | PTA_SSE4_1 | PTA_SSE4_2 | PTA_SSSE3;
> -const wide_int_bitmask PTA_X86_64_V3 = PTA_X86_64_V2
> +constexpr wide_int_bitmask PTA_X86_64_V3 = PTA_X86_64_V2
>    | PTA_AVX | PTA_AVX2 | PTA_BMI | PTA_BMI2 | PTA_F16C | PTA_FMA | PTA_LZCNT
>    | PTA_MOVBE | PTA_XSAVE;
> -const wide_int_bitmask PTA_X86_64_V4 = PTA_X86_64_V3
> +constexpr wide_int_bitmask PTA_X86_64_V4 = PTA_X86_64_V3
>    | PTA_AVX512F | PTA_AVX512BW | PTA_AVX512CD | PTA_AVX512DQ | PTA_AVX512VL;
>  
> -const wide_int_bitmask PTA_CORE2 = PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2
> +constexpr wide_int_bitmask PTA_CORE2 = PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2
>    | PTA_SSE3 | PTA_SSSE3 | PTA_CX16 | PTA_FXSR;
> -const wide_int_bitmask PTA_NEHALEM = PTA_CORE2 | PTA_SSE4_1 | PTA_SSE4_2
> +constexpr wide_int_bitmask PTA_NEHALEM = PTA_CORE2 | PTA_SSE4_1 | PTA_SSE4_2
>    | PTA_POPCNT;
> -const wide_int_bitmask PTA_WESTMERE = PTA_NEHALEM | PTA_PCLMUL;
> -const wide_int_bitmask PTA_SANDYBRIDGE = PTA_WESTMERE | PTA_AVX | PTA_XSAVE
> +constexpr wide_int_bitmask PTA_WESTMERE = PTA_NEHALEM | PTA_PCLMUL;
> +constexpr wide_int_bitmask PTA_SANDYBRIDGE = PTA_WESTMERE | PTA_AVX | PTA_XSAVE
>    | PTA_XSAVEOPT;
> -const wide_int_bitmask PTA_IVYBRIDGE = PTA_SANDYBRIDGE | PTA_FSGSBASE
> +constexpr wide_int_bitmask PTA_IVYBRIDGE = PTA_SANDYBRIDGE | PTA_FSGSBASE
>    | PTA_RDRND | PTA_F16C;
> -const wide_int_bitmask PTA_HASWELL = PTA_IVYBRIDGE | PTA_AVX2 | PTA_BMI
> +constexpr wide_int_bitmask PTA_HASWELL = PTA_IVYBRIDGE | PTA_AVX2 | PTA_BMI
>    | PTA_BMI2 | PTA_LZCNT | PTA_FMA | PTA_MOVBE | PTA_HLE;
> -const wide_int_bitmask PTA_BROADWELL = PTA_HASWELL | PTA_ADX | PTA_RDSEED
> +constexpr wide_int_bitmask PTA_BROADWELL = PTA_HASWELL | PTA_ADX | PTA_RDSEED
>    | PTA_PRFCHW;
> -const wide_int_bitmask PTA_SKYLAKE = PTA_BROADWELL | PTA_AES | PTA_CLFLUSHOPT
> -  | PTA_XSAVEC | PTA_XSAVES | PTA_SGX;
> -const wide_int_bitmask PTA_SKYLAKE_AVX512 = PTA_SKYLAKE | PTA_AVX512F
> +constexpr wide_int_bitmask PTA_SKYLAKE = PTA_BROADWELL | PTA_AES
> +  | PTA_CLFLUSHOPT | PTA_XSAVEC | PTA_XSAVES | PTA_SGX;
> +constexpr wide_int_bitmask PTA_SKYLAKE_AVX512 = PTA_SKYLAKE | PTA_AVX512F
>    | PTA_AVX512CD | PTA_AVX512VL | PTA_AVX512BW | PTA_AVX512DQ | PTA_PKU
>    | PTA_CLWB;
> -const wide_int_bitmask PTA_CASCADELAKE = PTA_SKYLAKE_AVX512 | PTA_AVX512VNNI;
> -const wide_int_bitmask PTA_COOPERLAKE = PTA_CASCADELAKE | PTA_AVX512BF16;
> -const wide_int_bitmask PTA_CANNONLAKE = PTA_SKYLAKE | PTA_AVX512F
> +constexpr wide_int_bitmask PTA_CASCADELAKE = PTA_SKYLAKE_AVX512
> +  | PTA_AVX512VNNI;
> +constexpr wide_int_bitmask PTA_COOPERLAKE = PTA_CASCADELAKE | PTA_AVX512BF16;
> +constexpr wide_int_bitmask PTA_CANNONLAKE = PTA_SKYLAKE | PTA_AVX512F
>    | PTA_AVX512CD | PTA_AVX512VL | PTA_AVX512BW | PTA_AVX512DQ | PTA_PKU
>    | PTA_AVX512VBMI | PTA_AVX512IFMA | PTA_SHA;
> -const wide_int_bitmask PTA_ICELAKE_CLIENT = PTA_CANNONLAKE | PTA_AVX512VNNI
> +constexpr wide_int_bitmask PTA_ICELAKE_CLIENT = PTA_CANNONLAKE | PTA_AVX512VNNI
>    | PTA_GFNI | PTA_VAES | PTA_AVX512VBMI2 | PTA_VPCLMULQDQ | PTA_AVX512BITALG
>    | PTA_RDPID | PTA_AVX512VPOPCNTDQ;
> -const wide_int_bitmask PTA_ICELAKE_SERVER = PTA_ICELAKE_CLIENT | PTA_PCONFIG
> -  | PTA_WBNOINVD | PTA_CLWB;
> -const wide_int_bitmask PTA_TIGERLAKE = PTA_ICELAKE_CLIENT | PTA_MOVDIRI
> +constexpr wide_int_bitmask PTA_ICELAKE_SERVER = PTA_ICELAKE_CLIENT
> +  | PTA_PCONFIG | PTA_WBNOINVD | PTA_CLWB;
> +constexpr wide_int_bitmask PTA_TIGERLAKE = PTA_ICELAKE_CLIENT | PTA_MOVDIRI
>    | PTA_MOVDIR64B | PTA_CLWB | PTA_AVX512VP2INTERSECT | PTA_KL | PTA_WIDEKL;
> -const wide_int_bitmask PTA_SAPPHIRERAPIDS = PTA_COOPERLAKE | PTA_MOVDIRI
> +constexpr wide_int_bitmask PTA_SAPPHIRERAPIDS = PTA_COOPERLAKE | PTA_MOVDIRI
>    | PTA_MOVDIR64B | PTA_AVX512VP2INTERSECT | PTA_ENQCMD | PTA_CLDEMOTE
>    | PTA_PTWRITE | PTA_WAITPKG | PTA_SERIALIZE | PTA_TSXLDTRK | PTA_AMX_TILE
>    | PTA_AMX_INT8 | PTA_AMX_BF16 | PTA_UINTR | PTA_AVXVNNI;
> -const wide_int_bitmask PTA_ALDERLAKE = PTA_SKYLAKE | PTA_CLDEMOTE | PTA_PTWRITE
> -  | PTA_WAITPKG | PTA_SERIALIZE | PTA_HRESET | PTA_KL | PTA_WIDEKL | PTA_AVXVNNI;
> -const wide_int_bitmask PTA_KNL = PTA_BROADWELL | PTA_AVX512PF | PTA_AVX512ER
> -  | PTA_AVX512F | PTA_AVX512CD | PTA_PREFETCHWT1;
> -const wide_int_bitmask PTA_BONNELL = PTA_CORE2 | PTA_MOVBE;
> -const wide_int_bitmask PTA_SILVERMONT = PTA_WESTMERE | PTA_MOVBE | PTA_RDRND
> -  | PTA_PRFCHW;
> -const wide_int_bitmask PTA_GOLDMONT = PTA_SILVERMONT | PTA_AES | PTA_SHA | PTA_XSAVE
> -  | PTA_RDSEED | PTA_XSAVEC | PTA_XSAVES | PTA_CLFLUSHOPT | PTA_XSAVEOPT
> -  | PTA_FSGSBASE;
> -const wide_int_bitmask PTA_GOLDMONT_PLUS = PTA_GOLDMONT | PTA_RDPID
> +constexpr wide_int_bitmask PTA_ALDERLAKE = PTA_SKYLAKE | PTA_CLDEMOTE
> +  | PTA_PTWRITE | PTA_WAITPKG | PTA_SERIALIZE | PTA_HRESET | PTA_KL
> +  | PTA_WIDEKL | PTA_AVXVNNI;
> +constexpr wide_int_bitmask PTA_KNL = PTA_BROADWELL | PTA_AVX512PF
> +  | PTA_AVX512ER | PTA_AVX512F | PTA_AVX512CD | PTA_PREFETCHWT1;
> +constexpr wide_int_bitmask PTA_BONNELL = PTA_CORE2 | PTA_MOVBE;
> +constexpr wide_int_bitmask PTA_SILVERMONT = PTA_WESTMERE | PTA_MOVBE
> +  | PTA_RDRND | PTA_PRFCHW;
> +constexpr wide_int_bitmask PTA_GOLDMONT = PTA_SILVERMONT | PTA_AES | PTA_SHA
> +  | PTA_XSAVE | PTA_RDSEED | PTA_XSAVEC | PTA_XSAVES | PTA_CLFLUSHOPT
> +  | PTA_XSAVEOPT | PTA_FSGSBASE;
> +constexpr wide_int_bitmask PTA_GOLDMONT_PLUS = PTA_GOLDMONT | PTA_RDPID
>    | PTA_SGX | PTA_PTWRITE;
> -const wide_int_bitmask PTA_TREMONT = PTA_GOLDMONT_PLUS | PTA_CLWB
> +constexpr wide_int_bitmask PTA_TREMONT = PTA_GOLDMONT_PLUS | PTA_CLWB
>    | PTA_GFNI | PTA_MOVDIRI | PTA_MOVDIR64B | PTA_CLDEMOTE | PTA_WAITPKG;
> -const wide_int_bitmask PTA_KNM = PTA_KNL | PTA_AVX5124VNNIW
> +constexpr wide_int_bitmask PTA_KNM = PTA_KNL | PTA_AVX5124VNNIW
>    | PTA_AVX5124FMAPS | PTA_AVX512VPOPCNTDQ;
>  
>  #ifndef GENERATOR_FILE
> 
> 	Jakub
> 
>
Jakub Jelinek Feb. 18, 2021, 9:31 a.m. UTC | #2
On Thu, Feb 18, 2021 at 09:42:00AM +0100, Richard Biener wrote:
> > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
> 
> OK.  Can you quickly try whether GCC 4.8 is happy with it?

Yes, at least non-bootstrap build with GCC 4.8.5 is just fine with it.

	Jakub
diff mbox series

Patch

--- gcc/wide-int-bitmask.h.jj	2021-01-04 10:25:38.611236338 +0100
+++ gcc/wide-int-bitmask.h	2021-02-16 15:55:55.848542878 +0100
@@ -23,14 +23,14 @@  along with GCC; see the file COPYING3.
 class wide_int_bitmask
 {
 public:
-  inline wide_int_bitmask ();
-  inline wide_int_bitmask (uint64_t l);
-  inline wide_int_bitmask (uint64_t l, uint64_t h);
+  constexpr wide_int_bitmask ();
+  constexpr wide_int_bitmask (uint64_t l);
+  constexpr wide_int_bitmask (uint64_t l, uint64_t h);
   inline wide_int_bitmask &operator &= (wide_int_bitmask);
   inline wide_int_bitmask &operator |= (wide_int_bitmask);
-  inline wide_int_bitmask operator ~ () const;
-  inline wide_int_bitmask operator & (wide_int_bitmask) const;
-  inline wide_int_bitmask operator | (wide_int_bitmask) const;
+  constexpr wide_int_bitmask operator ~ () const;
+  constexpr wide_int_bitmask operator & (wide_int_bitmask) const;
+  constexpr wide_int_bitmask operator | (wide_int_bitmask) const;
   inline wide_int_bitmask operator >> (int);
   inline wide_int_bitmask operator << (int);
   inline bool operator == (wide_int_bitmask) const;
@@ -38,19 +38,19 @@  public:
   uint64_t low, high;
 };
 
-inline
+constexpr
 wide_int_bitmask::wide_int_bitmask ()
 : low (0), high (0)
 {
 }
 
-inline
+constexpr
 wide_int_bitmask::wide_int_bitmask (uint64_t l)
 : low (l), high (0)
 {
 }
 
-inline
+constexpr
 wide_int_bitmask::wide_int_bitmask (uint64_t l, uint64_t h)
 : low (l), high (h)
 {
@@ -72,25 +72,22 @@  wide_int_bitmask::operator |= (wide_int_
   return *this;
 }
 
-inline wide_int_bitmask
+constexpr wide_int_bitmask
 wide_int_bitmask::operator ~ () const
 {
-  wide_int_bitmask ret (~low, ~high);
-  return ret;
+  return wide_int_bitmask (~low, ~high);
 }
 
-inline wide_int_bitmask
+constexpr wide_int_bitmask
 wide_int_bitmask::operator | (wide_int_bitmask b) const
 {
-  wide_int_bitmask ret (low | b.low, high | b.high);
-  return ret;
+  return wide_int_bitmask (low | b.low, high | b.high);
 }
 
-inline wide_int_bitmask
+constexpr wide_int_bitmask
 wide_int_bitmask::operator & (wide_int_bitmask b) const
 {
-  wide_int_bitmask ret (low & b.low, high & b.high);
-  return ret;
+  return wide_int_bitmask (low & b.low, high & b.high);
 }
 
 inline wide_int_bitmask
--- gcc/config/i386/i386.h.jj	2021-01-14 19:34:06.065425013 +0100
+++ gcc/config/i386/i386.h	2021-02-16 15:58:57.272497497 +0100
@@ -2391,157 +2391,160 @@  extern const char *const processor_names
 
 #include "wide-int-bitmask.h"
 
-const wide_int_bitmask PTA_3DNOW (HOST_WIDE_INT_1U << 0);
-const wide_int_bitmask PTA_3DNOW_A (HOST_WIDE_INT_1U << 1);
-const wide_int_bitmask PTA_64BIT (HOST_WIDE_INT_1U << 2);
-const wide_int_bitmask PTA_ABM (HOST_WIDE_INT_1U << 3);
-const wide_int_bitmask PTA_AES (HOST_WIDE_INT_1U << 4);
-const wide_int_bitmask PTA_AVX (HOST_WIDE_INT_1U << 5);
-const wide_int_bitmask PTA_BMI (HOST_WIDE_INT_1U << 6);
-const wide_int_bitmask PTA_CX16 (HOST_WIDE_INT_1U << 7);
-const wide_int_bitmask PTA_F16C (HOST_WIDE_INT_1U << 8);
-const wide_int_bitmask PTA_FMA (HOST_WIDE_INT_1U << 9);
-const wide_int_bitmask PTA_FMA4 (HOST_WIDE_INT_1U << 10);
-const wide_int_bitmask PTA_FSGSBASE (HOST_WIDE_INT_1U << 11);
-const wide_int_bitmask PTA_LWP (HOST_WIDE_INT_1U << 12);
-const wide_int_bitmask PTA_LZCNT (HOST_WIDE_INT_1U << 13);
-const wide_int_bitmask PTA_MMX (HOST_WIDE_INT_1U << 14);
-const wide_int_bitmask PTA_MOVBE (HOST_WIDE_INT_1U << 15);
-const wide_int_bitmask PTA_NO_SAHF (HOST_WIDE_INT_1U << 16);
-const wide_int_bitmask PTA_PCLMUL (HOST_WIDE_INT_1U << 17);
-const wide_int_bitmask PTA_POPCNT (HOST_WIDE_INT_1U << 18);
-const wide_int_bitmask PTA_PREFETCH_SSE (HOST_WIDE_INT_1U << 19);
-const wide_int_bitmask PTA_RDRND (HOST_WIDE_INT_1U << 20);
-const wide_int_bitmask PTA_SSE (HOST_WIDE_INT_1U << 21);
-const wide_int_bitmask PTA_SSE2 (HOST_WIDE_INT_1U << 22);
-const wide_int_bitmask PTA_SSE3 (HOST_WIDE_INT_1U << 23);
-const wide_int_bitmask PTA_SSE4_1 (HOST_WIDE_INT_1U << 24);
-const wide_int_bitmask PTA_SSE4_2 (HOST_WIDE_INT_1U << 25);
-const wide_int_bitmask PTA_SSE4A (HOST_WIDE_INT_1U << 26);
-const wide_int_bitmask PTA_SSSE3 (HOST_WIDE_INT_1U << 27);
-const wide_int_bitmask PTA_TBM (HOST_WIDE_INT_1U << 28);
-const wide_int_bitmask PTA_XOP (HOST_WIDE_INT_1U << 29);
-const wide_int_bitmask PTA_AVX2 (HOST_WIDE_INT_1U << 30);
-const wide_int_bitmask PTA_BMI2 (HOST_WIDE_INT_1U << 31);
-const wide_int_bitmask PTA_RTM (HOST_WIDE_INT_1U << 32);
-const wide_int_bitmask PTA_HLE (HOST_WIDE_INT_1U << 33);
-const wide_int_bitmask PTA_PRFCHW (HOST_WIDE_INT_1U << 34);
-const wide_int_bitmask PTA_RDSEED (HOST_WIDE_INT_1U << 35);
-const wide_int_bitmask PTA_ADX (HOST_WIDE_INT_1U << 36);
-const wide_int_bitmask PTA_FXSR (HOST_WIDE_INT_1U << 37);
-const wide_int_bitmask PTA_XSAVE (HOST_WIDE_INT_1U << 38);
-const wide_int_bitmask PTA_XSAVEOPT (HOST_WIDE_INT_1U << 39);
-const wide_int_bitmask PTA_AVX512F (HOST_WIDE_INT_1U << 40);
-const wide_int_bitmask PTA_AVX512ER (HOST_WIDE_INT_1U << 41);
-const wide_int_bitmask PTA_AVX512PF (HOST_WIDE_INT_1U << 42);
-const wide_int_bitmask PTA_AVX512CD (HOST_WIDE_INT_1U << 43);
-const wide_int_bitmask PTA_NO_TUNE (HOST_WIDE_INT_1U << 44);
-const wide_int_bitmask PTA_SHA (HOST_WIDE_INT_1U << 45);
-const wide_int_bitmask PTA_PREFETCHWT1 (HOST_WIDE_INT_1U << 46);
-const wide_int_bitmask PTA_CLFLUSHOPT (HOST_WIDE_INT_1U << 47);
-const wide_int_bitmask PTA_XSAVEC (HOST_WIDE_INT_1U << 48);
-const wide_int_bitmask PTA_XSAVES (HOST_WIDE_INT_1U << 49);
-const wide_int_bitmask PTA_AVX512DQ (HOST_WIDE_INT_1U << 50);
-const wide_int_bitmask PTA_AVX512BW (HOST_WIDE_INT_1U << 51);
-const wide_int_bitmask PTA_AVX512VL (HOST_WIDE_INT_1U << 52);
-const wide_int_bitmask PTA_AVX512IFMA (HOST_WIDE_INT_1U << 53);
-const wide_int_bitmask PTA_AVX512VBMI (HOST_WIDE_INT_1U << 54);
-const wide_int_bitmask PTA_CLWB (HOST_WIDE_INT_1U << 55);
-const wide_int_bitmask PTA_MWAITX (HOST_WIDE_INT_1U << 56);
-const wide_int_bitmask PTA_CLZERO (HOST_WIDE_INT_1U << 57);
-const wide_int_bitmask PTA_NO_80387 (HOST_WIDE_INT_1U << 58);
-const wide_int_bitmask PTA_PKU (HOST_WIDE_INT_1U << 59);
-const wide_int_bitmask PTA_AVX5124VNNIW (HOST_WIDE_INT_1U << 60);
-const wide_int_bitmask PTA_AVX5124FMAPS (HOST_WIDE_INT_1U << 61);
-const wide_int_bitmask PTA_AVX512VPOPCNTDQ (HOST_WIDE_INT_1U << 62);
-const wide_int_bitmask PTA_SGX (HOST_WIDE_INT_1U << 63);
-const wide_int_bitmask PTA_AVX512VNNI (0, HOST_WIDE_INT_1U);
-const wide_int_bitmask PTA_GFNI (0, HOST_WIDE_INT_1U << 1);
-const wide_int_bitmask PTA_VAES (0, HOST_WIDE_INT_1U << 2);
-const wide_int_bitmask PTA_AVX512VBMI2 (0, HOST_WIDE_INT_1U << 3);
-const wide_int_bitmask PTA_VPCLMULQDQ (0, HOST_WIDE_INT_1U << 4);
-const wide_int_bitmask PTA_AVX512BITALG (0, HOST_WIDE_INT_1U << 5);
-const wide_int_bitmask PTA_RDPID (0, HOST_WIDE_INT_1U << 6);
-const wide_int_bitmask PTA_PCONFIG (0, HOST_WIDE_INT_1U << 7);
-const wide_int_bitmask PTA_WBNOINVD (0, HOST_WIDE_INT_1U << 8);
-const wide_int_bitmask PTA_AVX512VP2INTERSECT (0, HOST_WIDE_INT_1U << 9);
-const wide_int_bitmask PTA_PTWRITE (0, HOST_WIDE_INT_1U << 10);
-const wide_int_bitmask PTA_AVX512BF16 (0, HOST_WIDE_INT_1U << 11);
-const wide_int_bitmask PTA_WAITPKG (0, HOST_WIDE_INT_1U << 12);
-const wide_int_bitmask PTA_MOVDIRI (0, HOST_WIDE_INT_1U << 13);
-const wide_int_bitmask PTA_MOVDIR64B (0, HOST_WIDE_INT_1U << 14);
-const wide_int_bitmask PTA_ENQCMD (0, HOST_WIDE_INT_1U << 15);
-const wide_int_bitmask PTA_CLDEMOTE (0, HOST_WIDE_INT_1U << 16);
-const wide_int_bitmask PTA_SERIALIZE (0, HOST_WIDE_INT_1U << 17);
-const wide_int_bitmask PTA_TSXLDTRK (0, HOST_WIDE_INT_1U << 18);
-const wide_int_bitmask PTA_AMX_TILE (0, HOST_WIDE_INT_1U << 19);
-const wide_int_bitmask PTA_AMX_INT8 (0, HOST_WIDE_INT_1U << 20);
-const wide_int_bitmask PTA_AMX_BF16 (0, HOST_WIDE_INT_1U << 21);
-const wide_int_bitmask PTA_UINTR (0, HOST_WIDE_INT_1U << 22);
-const wide_int_bitmask PTA_HRESET (0, HOST_WIDE_INT_1U << 23);
-const wide_int_bitmask PTA_KL (0, HOST_WIDE_INT_1U << 24);
-const wide_int_bitmask PTA_WIDEKL (0, HOST_WIDE_INT_1U << 25);
-const wide_int_bitmask PTA_AVXVNNI (0, HOST_WIDE_INT_1U << 26);
+constexpr wide_int_bitmask PTA_3DNOW (HOST_WIDE_INT_1U << 0);
+constexpr wide_int_bitmask PTA_3DNOW_A (HOST_WIDE_INT_1U << 1);
+constexpr wide_int_bitmask PTA_64BIT (HOST_WIDE_INT_1U << 2);
+constexpr wide_int_bitmask PTA_ABM (HOST_WIDE_INT_1U << 3);
+constexpr wide_int_bitmask PTA_AES (HOST_WIDE_INT_1U << 4);
+constexpr wide_int_bitmask PTA_AVX (HOST_WIDE_INT_1U << 5);
+constexpr wide_int_bitmask PTA_BMI (HOST_WIDE_INT_1U << 6);
+constexpr wide_int_bitmask PTA_CX16 (HOST_WIDE_INT_1U << 7);
+constexpr wide_int_bitmask PTA_F16C (HOST_WIDE_INT_1U << 8);
+constexpr wide_int_bitmask PTA_FMA (HOST_WIDE_INT_1U << 9);
+constexpr wide_int_bitmask PTA_FMA4 (HOST_WIDE_INT_1U << 10);
+constexpr wide_int_bitmask PTA_FSGSBASE (HOST_WIDE_INT_1U << 11);
+constexpr wide_int_bitmask PTA_LWP (HOST_WIDE_INT_1U << 12);
+constexpr wide_int_bitmask PTA_LZCNT (HOST_WIDE_INT_1U << 13);
+constexpr wide_int_bitmask PTA_MMX (HOST_WIDE_INT_1U << 14);
+constexpr wide_int_bitmask PTA_MOVBE (HOST_WIDE_INT_1U << 15);
+constexpr wide_int_bitmask PTA_NO_SAHF (HOST_WIDE_INT_1U << 16);
+constexpr wide_int_bitmask PTA_PCLMUL (HOST_WIDE_INT_1U << 17);
+constexpr wide_int_bitmask PTA_POPCNT (HOST_WIDE_INT_1U << 18);
+constexpr wide_int_bitmask PTA_PREFETCH_SSE (HOST_WIDE_INT_1U << 19);
+constexpr wide_int_bitmask PTA_RDRND (HOST_WIDE_INT_1U << 20);
+constexpr wide_int_bitmask PTA_SSE (HOST_WIDE_INT_1U << 21);
+constexpr wide_int_bitmask PTA_SSE2 (HOST_WIDE_INT_1U << 22);
+constexpr wide_int_bitmask PTA_SSE3 (HOST_WIDE_INT_1U << 23);
+constexpr wide_int_bitmask PTA_SSE4_1 (HOST_WIDE_INT_1U << 24);
+constexpr wide_int_bitmask PTA_SSE4_2 (HOST_WIDE_INT_1U << 25);
+constexpr wide_int_bitmask PTA_SSE4A (HOST_WIDE_INT_1U << 26);
+constexpr wide_int_bitmask PTA_SSSE3 (HOST_WIDE_INT_1U << 27);
+constexpr wide_int_bitmask PTA_TBM (HOST_WIDE_INT_1U << 28);
+constexpr wide_int_bitmask PTA_XOP (HOST_WIDE_INT_1U << 29);
+constexpr wide_int_bitmask PTA_AVX2 (HOST_WIDE_INT_1U << 30);
+constexpr wide_int_bitmask PTA_BMI2 (HOST_WIDE_INT_1U << 31);
+constexpr wide_int_bitmask PTA_RTM (HOST_WIDE_INT_1U << 32);
+constexpr wide_int_bitmask PTA_HLE (HOST_WIDE_INT_1U << 33);
+constexpr wide_int_bitmask PTA_PRFCHW (HOST_WIDE_INT_1U << 34);
+constexpr wide_int_bitmask PTA_RDSEED (HOST_WIDE_INT_1U << 35);
+constexpr wide_int_bitmask PTA_ADX (HOST_WIDE_INT_1U << 36);
+constexpr wide_int_bitmask PTA_FXSR (HOST_WIDE_INT_1U << 37);
+constexpr wide_int_bitmask PTA_XSAVE (HOST_WIDE_INT_1U << 38);
+constexpr wide_int_bitmask PTA_XSAVEOPT (HOST_WIDE_INT_1U << 39);
+constexpr wide_int_bitmask PTA_AVX512F (HOST_WIDE_INT_1U << 40);
+constexpr wide_int_bitmask PTA_AVX512ER (HOST_WIDE_INT_1U << 41);
+constexpr wide_int_bitmask PTA_AVX512PF (HOST_WIDE_INT_1U << 42);
+constexpr wide_int_bitmask PTA_AVX512CD (HOST_WIDE_INT_1U << 43);
+constexpr wide_int_bitmask PTA_NO_TUNE (HOST_WIDE_INT_1U << 44);
+constexpr wide_int_bitmask PTA_SHA (HOST_WIDE_INT_1U << 45);
+constexpr wide_int_bitmask PTA_PREFETCHWT1 (HOST_WIDE_INT_1U << 46);
+constexpr wide_int_bitmask PTA_CLFLUSHOPT (HOST_WIDE_INT_1U << 47);
+constexpr wide_int_bitmask PTA_XSAVEC (HOST_WIDE_INT_1U << 48);
+constexpr wide_int_bitmask PTA_XSAVES (HOST_WIDE_INT_1U << 49);
+constexpr wide_int_bitmask PTA_AVX512DQ (HOST_WIDE_INT_1U << 50);
+constexpr wide_int_bitmask PTA_AVX512BW (HOST_WIDE_INT_1U << 51);
+constexpr wide_int_bitmask PTA_AVX512VL (HOST_WIDE_INT_1U << 52);
+constexpr wide_int_bitmask PTA_AVX512IFMA (HOST_WIDE_INT_1U << 53);
+constexpr wide_int_bitmask PTA_AVX512VBMI (HOST_WIDE_INT_1U << 54);
+constexpr wide_int_bitmask PTA_CLWB (HOST_WIDE_INT_1U << 55);
+constexpr wide_int_bitmask PTA_MWAITX (HOST_WIDE_INT_1U << 56);
+constexpr wide_int_bitmask PTA_CLZERO (HOST_WIDE_INT_1U << 57);
+constexpr wide_int_bitmask PTA_NO_80387 (HOST_WIDE_INT_1U << 58);
+constexpr wide_int_bitmask PTA_PKU (HOST_WIDE_INT_1U << 59);
+constexpr wide_int_bitmask PTA_AVX5124VNNIW (HOST_WIDE_INT_1U << 60);
+constexpr wide_int_bitmask PTA_AVX5124FMAPS (HOST_WIDE_INT_1U << 61);
+constexpr wide_int_bitmask PTA_AVX512VPOPCNTDQ (HOST_WIDE_INT_1U << 62);
+constexpr wide_int_bitmask PTA_SGX (HOST_WIDE_INT_1U << 63);
+constexpr wide_int_bitmask PTA_AVX512VNNI (0, HOST_WIDE_INT_1U);
+constexpr wide_int_bitmask PTA_GFNI (0, HOST_WIDE_INT_1U << 1);
+constexpr wide_int_bitmask PTA_VAES (0, HOST_WIDE_INT_1U << 2);
+constexpr wide_int_bitmask PTA_AVX512VBMI2 (0, HOST_WIDE_INT_1U << 3);
+constexpr wide_int_bitmask PTA_VPCLMULQDQ (0, HOST_WIDE_INT_1U << 4);
+constexpr wide_int_bitmask PTA_AVX512BITALG (0, HOST_WIDE_INT_1U << 5);
+constexpr wide_int_bitmask PTA_RDPID (0, HOST_WIDE_INT_1U << 6);
+constexpr wide_int_bitmask PTA_PCONFIG (0, HOST_WIDE_INT_1U << 7);
+constexpr wide_int_bitmask PTA_WBNOINVD (0, HOST_WIDE_INT_1U << 8);
+constexpr wide_int_bitmask PTA_AVX512VP2INTERSECT (0, HOST_WIDE_INT_1U << 9);
+constexpr wide_int_bitmask PTA_PTWRITE (0, HOST_WIDE_INT_1U << 10);
+constexpr wide_int_bitmask PTA_AVX512BF16 (0, HOST_WIDE_INT_1U << 11);
+constexpr wide_int_bitmask PTA_WAITPKG (0, HOST_WIDE_INT_1U << 12);
+constexpr wide_int_bitmask PTA_MOVDIRI (0, HOST_WIDE_INT_1U << 13);
+constexpr wide_int_bitmask PTA_MOVDIR64B (0, HOST_WIDE_INT_1U << 14);
+constexpr wide_int_bitmask PTA_ENQCMD (0, HOST_WIDE_INT_1U << 15);
+constexpr wide_int_bitmask PTA_CLDEMOTE (0, HOST_WIDE_INT_1U << 16);
+constexpr wide_int_bitmask PTA_SERIALIZE (0, HOST_WIDE_INT_1U << 17);
+constexpr wide_int_bitmask PTA_TSXLDTRK (0, HOST_WIDE_INT_1U << 18);
+constexpr wide_int_bitmask PTA_AMX_TILE (0, HOST_WIDE_INT_1U << 19);
+constexpr wide_int_bitmask PTA_AMX_INT8 (0, HOST_WIDE_INT_1U << 20);
+constexpr wide_int_bitmask PTA_AMX_BF16 (0, HOST_WIDE_INT_1U << 21);
+constexpr wide_int_bitmask PTA_UINTR (0, HOST_WIDE_INT_1U << 22);
+constexpr wide_int_bitmask PTA_HRESET (0, HOST_WIDE_INT_1U << 23);
+constexpr wide_int_bitmask PTA_KL (0, HOST_WIDE_INT_1U << 24);
+constexpr wide_int_bitmask PTA_WIDEKL (0, HOST_WIDE_INT_1U << 25);
+constexpr wide_int_bitmask PTA_AVXVNNI (0, HOST_WIDE_INT_1U << 26);
 
-const wide_int_bitmask PTA_X86_64_BASELINE = PTA_64BIT | PTA_MMX | PTA_SSE
+constexpr wide_int_bitmask PTA_X86_64_BASELINE = PTA_64BIT | PTA_MMX | PTA_SSE
   | PTA_SSE2 | PTA_NO_SAHF | PTA_FXSR;
-const wide_int_bitmask PTA_X86_64_V2 = (PTA_X86_64_BASELINE & (~PTA_NO_SAHF))
+constexpr wide_int_bitmask PTA_X86_64_V2 = (PTA_X86_64_BASELINE
+					    & (~PTA_NO_SAHF))
   | PTA_CX16 | PTA_POPCNT | PTA_SSE3 | PTA_SSE4_1 | PTA_SSE4_2 | PTA_SSSE3;
-const wide_int_bitmask PTA_X86_64_V3 = PTA_X86_64_V2
+constexpr wide_int_bitmask PTA_X86_64_V3 = PTA_X86_64_V2
   | PTA_AVX | PTA_AVX2 | PTA_BMI | PTA_BMI2 | PTA_F16C | PTA_FMA | PTA_LZCNT
   | PTA_MOVBE | PTA_XSAVE;
-const wide_int_bitmask PTA_X86_64_V4 = PTA_X86_64_V3
+constexpr wide_int_bitmask PTA_X86_64_V4 = PTA_X86_64_V3
   | PTA_AVX512F | PTA_AVX512BW | PTA_AVX512CD | PTA_AVX512DQ | PTA_AVX512VL;
 
-const wide_int_bitmask PTA_CORE2 = PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2
+constexpr wide_int_bitmask PTA_CORE2 = PTA_64BIT | PTA_MMX | PTA_SSE | PTA_SSE2
   | PTA_SSE3 | PTA_SSSE3 | PTA_CX16 | PTA_FXSR;
-const wide_int_bitmask PTA_NEHALEM = PTA_CORE2 | PTA_SSE4_1 | PTA_SSE4_2
+constexpr wide_int_bitmask PTA_NEHALEM = PTA_CORE2 | PTA_SSE4_1 | PTA_SSE4_2
   | PTA_POPCNT;
-const wide_int_bitmask PTA_WESTMERE = PTA_NEHALEM | PTA_PCLMUL;
-const wide_int_bitmask PTA_SANDYBRIDGE = PTA_WESTMERE | PTA_AVX | PTA_XSAVE
+constexpr wide_int_bitmask PTA_WESTMERE = PTA_NEHALEM | PTA_PCLMUL;
+constexpr wide_int_bitmask PTA_SANDYBRIDGE = PTA_WESTMERE | PTA_AVX | PTA_XSAVE
   | PTA_XSAVEOPT;
-const wide_int_bitmask PTA_IVYBRIDGE = PTA_SANDYBRIDGE | PTA_FSGSBASE
+constexpr wide_int_bitmask PTA_IVYBRIDGE = PTA_SANDYBRIDGE | PTA_FSGSBASE
   | PTA_RDRND | PTA_F16C;
-const wide_int_bitmask PTA_HASWELL = PTA_IVYBRIDGE | PTA_AVX2 | PTA_BMI
+constexpr wide_int_bitmask PTA_HASWELL = PTA_IVYBRIDGE | PTA_AVX2 | PTA_BMI
   | PTA_BMI2 | PTA_LZCNT | PTA_FMA | PTA_MOVBE | PTA_HLE;
-const wide_int_bitmask PTA_BROADWELL = PTA_HASWELL | PTA_ADX | PTA_RDSEED
+constexpr wide_int_bitmask PTA_BROADWELL = PTA_HASWELL | PTA_ADX | PTA_RDSEED
   | PTA_PRFCHW;
-const wide_int_bitmask PTA_SKYLAKE = PTA_BROADWELL | PTA_AES | PTA_CLFLUSHOPT
-  | PTA_XSAVEC | PTA_XSAVES | PTA_SGX;
-const wide_int_bitmask PTA_SKYLAKE_AVX512 = PTA_SKYLAKE | PTA_AVX512F
+constexpr wide_int_bitmask PTA_SKYLAKE = PTA_BROADWELL | PTA_AES
+  | PTA_CLFLUSHOPT | PTA_XSAVEC | PTA_XSAVES | PTA_SGX;
+constexpr wide_int_bitmask PTA_SKYLAKE_AVX512 = PTA_SKYLAKE | PTA_AVX512F
   | PTA_AVX512CD | PTA_AVX512VL | PTA_AVX512BW | PTA_AVX512DQ | PTA_PKU
   | PTA_CLWB;
-const wide_int_bitmask PTA_CASCADELAKE = PTA_SKYLAKE_AVX512 | PTA_AVX512VNNI;
-const wide_int_bitmask PTA_COOPERLAKE = PTA_CASCADELAKE | PTA_AVX512BF16;
-const wide_int_bitmask PTA_CANNONLAKE = PTA_SKYLAKE | PTA_AVX512F
+constexpr wide_int_bitmask PTA_CASCADELAKE = PTA_SKYLAKE_AVX512
+  | PTA_AVX512VNNI;
+constexpr wide_int_bitmask PTA_COOPERLAKE = PTA_CASCADELAKE | PTA_AVX512BF16;
+constexpr wide_int_bitmask PTA_CANNONLAKE = PTA_SKYLAKE | PTA_AVX512F
   | PTA_AVX512CD | PTA_AVX512VL | PTA_AVX512BW | PTA_AVX512DQ | PTA_PKU
   | PTA_AVX512VBMI | PTA_AVX512IFMA | PTA_SHA;
-const wide_int_bitmask PTA_ICELAKE_CLIENT = PTA_CANNONLAKE | PTA_AVX512VNNI
+constexpr wide_int_bitmask PTA_ICELAKE_CLIENT = PTA_CANNONLAKE | PTA_AVX512VNNI
   | PTA_GFNI | PTA_VAES | PTA_AVX512VBMI2 | PTA_VPCLMULQDQ | PTA_AVX512BITALG
   | PTA_RDPID | PTA_AVX512VPOPCNTDQ;
-const wide_int_bitmask PTA_ICELAKE_SERVER = PTA_ICELAKE_CLIENT | PTA_PCONFIG
-  | PTA_WBNOINVD | PTA_CLWB;
-const wide_int_bitmask PTA_TIGERLAKE = PTA_ICELAKE_CLIENT | PTA_MOVDIRI
+constexpr wide_int_bitmask PTA_ICELAKE_SERVER = PTA_ICELAKE_CLIENT
+  | PTA_PCONFIG | PTA_WBNOINVD | PTA_CLWB;
+constexpr wide_int_bitmask PTA_TIGERLAKE = PTA_ICELAKE_CLIENT | PTA_MOVDIRI
   | PTA_MOVDIR64B | PTA_CLWB | PTA_AVX512VP2INTERSECT | PTA_KL | PTA_WIDEKL;
-const wide_int_bitmask PTA_SAPPHIRERAPIDS = PTA_COOPERLAKE | PTA_MOVDIRI
+constexpr wide_int_bitmask PTA_SAPPHIRERAPIDS = PTA_COOPERLAKE | PTA_MOVDIRI
   | PTA_MOVDIR64B | PTA_AVX512VP2INTERSECT | PTA_ENQCMD | PTA_CLDEMOTE
   | PTA_PTWRITE | PTA_WAITPKG | PTA_SERIALIZE | PTA_TSXLDTRK | PTA_AMX_TILE
   | PTA_AMX_INT8 | PTA_AMX_BF16 | PTA_UINTR | PTA_AVXVNNI;
-const wide_int_bitmask PTA_ALDERLAKE = PTA_SKYLAKE | PTA_CLDEMOTE | PTA_PTWRITE
-  | PTA_WAITPKG | PTA_SERIALIZE | PTA_HRESET | PTA_KL | PTA_WIDEKL | PTA_AVXVNNI;
-const wide_int_bitmask PTA_KNL = PTA_BROADWELL | PTA_AVX512PF | PTA_AVX512ER
-  | PTA_AVX512F | PTA_AVX512CD | PTA_PREFETCHWT1;
-const wide_int_bitmask PTA_BONNELL = PTA_CORE2 | PTA_MOVBE;
-const wide_int_bitmask PTA_SILVERMONT = PTA_WESTMERE | PTA_MOVBE | PTA_RDRND
-  | PTA_PRFCHW;
-const wide_int_bitmask PTA_GOLDMONT = PTA_SILVERMONT | PTA_AES | PTA_SHA | PTA_XSAVE
-  | PTA_RDSEED | PTA_XSAVEC | PTA_XSAVES | PTA_CLFLUSHOPT | PTA_XSAVEOPT
-  | PTA_FSGSBASE;
-const wide_int_bitmask PTA_GOLDMONT_PLUS = PTA_GOLDMONT | PTA_RDPID
+constexpr wide_int_bitmask PTA_ALDERLAKE = PTA_SKYLAKE | PTA_CLDEMOTE
+  | PTA_PTWRITE | PTA_WAITPKG | PTA_SERIALIZE | PTA_HRESET | PTA_KL
+  | PTA_WIDEKL | PTA_AVXVNNI;
+constexpr wide_int_bitmask PTA_KNL = PTA_BROADWELL | PTA_AVX512PF
+  | PTA_AVX512ER | PTA_AVX512F | PTA_AVX512CD | PTA_PREFETCHWT1;
+constexpr wide_int_bitmask PTA_BONNELL = PTA_CORE2 | PTA_MOVBE;
+constexpr wide_int_bitmask PTA_SILVERMONT = PTA_WESTMERE | PTA_MOVBE
+  | PTA_RDRND | PTA_PRFCHW;
+constexpr wide_int_bitmask PTA_GOLDMONT = PTA_SILVERMONT | PTA_AES | PTA_SHA
+  | PTA_XSAVE | PTA_RDSEED | PTA_XSAVEC | PTA_XSAVES | PTA_CLFLUSHOPT
+  | PTA_XSAVEOPT | PTA_FSGSBASE;
+constexpr wide_int_bitmask PTA_GOLDMONT_PLUS = PTA_GOLDMONT | PTA_RDPID
   | PTA_SGX | PTA_PTWRITE;
-const wide_int_bitmask PTA_TREMONT = PTA_GOLDMONT_PLUS | PTA_CLWB
+constexpr wide_int_bitmask PTA_TREMONT = PTA_GOLDMONT_PLUS | PTA_CLWB
   | PTA_GFNI | PTA_MOVDIRI | PTA_MOVDIR64B | PTA_CLDEMOTE | PTA_WAITPKG;
-const wide_int_bitmask PTA_KNM = PTA_KNL | PTA_AVX5124VNNIW
+constexpr wide_int_bitmask PTA_KNM = PTA_KNL | PTA_AVX5124VNNIW
   | PTA_AVX5124FMAPS | PTA_AVX512VPOPCNTDQ;
 
 #ifndef GENERATOR_FILE