Andrew Pinski - Re: [patch] tuning gcc for AMDFAM10 processor (patch 1) (original) (raw)
This is the mail archive of the gcc-patches@gcc.gnu.orgmailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
- From: Andrew Pinski
- To: ak at suse dot de (Andi Kleen)
- Cc: harsha dot jagasia at amd dot com (Jagasia Harsha), gcc-patches at gcc dot gnu dot org, michael dot meissner at amd dot com (Meissner Michael), dwarak dot rajagopal at amd dot com (rajagopal dwarak)
- Date: Thu, 1 Feb 2007 03:53:28 -0500 (EST)
- Subject: Re: [patch] tuning gcc for AMDFAM10 processor (patch 1)
On Wednesday 31 January 2007 23:06, Jagasia, Harsha wrote:
Also I was wondering how hard it would be to make gcc detect code patterns automatically for the new bitfield instructions?
We are looking to submit a patch before stage 2 closes that can use the new extractq/insertq instructions for zero_extract, but we are not sure how viable it will be because these are SSEx instructions. But, I am not sure if you were referring to that or to auto generating popcnt/lzcnt instructions, which happen to be integer instructions.
I guess they can be generated for __builtin_popcount/__builtin_ffs[1] Detecting straight C patterns for these would be likely fruitless because there is no standard idiom to write them.
[1] That doesn't seem to exist right now, but perhaps it should be added.
__builtin_ffs is there: DEF_EXT_LIB_BUILTIN (BUILT_IN_FFS, "ffs", BT_FN_INT_INT, ATTR_CONST_NOTHROW_LIST) DEF_EXT_LIB_BUILTIN (BUILT_IN_FFSIMAX, "ffsimax", BT_FN_INT_INTMAX, ATTR_CONST_NOTHROW_LIST) DEF_EXT_LIB_BUILTIN (BUILT_IN_FFSL, "ffsl", BT_FN_INT_LONG, ATTR_CONST_NOTHROW_LIST) DEF_EXT_LIB_BUILTIN (BUILT_IN_FFSLL, "ffsll", BT_FN_INT_LONGLONG, ATTR_CONST_NOTHROW_LIST)
at least for integal types. Likewise for __builtin_popcount: DEF_GCC_BUILTIN (BUILT_IN_POPCOUNT, "popcount", BT_FN_INT_UINT, ATTR_CONST_NOTHROW_LIST) DEF_GCC_BUILTIN (BUILT_IN_POPCOUNTIMAX, "popcountimax", BT_FN_INT_UINTMAX, ATTR_CONST_NOTHROW_LIST) DEF_GCC_BUILTIN (BUILT_IN_POPCOUNTL, "popcountl", BT_FN_INT_ULONG, ATTR_CONST_NOTHROW_LIST) DEF_GCC_BUILTIN (BUILT_IN_POPCOUNTLL, "popcountll", BT_FN_INT_ULONGLONG, ATTR_CONST_NOTHROW_LIST)
They are not defined on vector types but that is a different story I think.
-- Pinski
- References:
- Re: [patch] tuning gcc for AMDFAM10 processor (patch 1)
* From: Andi Kleen
- Re: [patch] tuning gcc for AMDFAM10 processor (patch 1)
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |