On Mon, Oct 20, 2014 at 05:41:25PM +0400, Kirill Yukhin wrote: > Hello, > This patch adds (almost) all built-ins needed by > AVX-512VL,BW,DQ intrinsics. > > Main questionable hunk is: > > diff --git a/gcc/tree-core.h b/gcc/tree-core.h > index b69312b..a639487 100644 > --- a/gcc/tree-core.h > +++ b/gcc/tree-core.h > @@ -1539,7 +1539,7 @@ struct GTY(()) tree_function_decl { > DECL_FUNCTION_CODE. Otherwise unused. > ??? The bitfield needs to be able to hold all target function > codes as well. */ > - ENUM_BITFIELD(built_in_function) function_code : 11; > + ENUM_BITFIELD(built_in_function) function_code : 12; > ENUM_BITFIELD(built_in_class) built_in_class : 2; > > unsigned static_ctor_flag : 1;
Well, decl_with_vis has 15 unused bits, so instead of growing FUNCTION_DECL significantly, might be better to move one of the flags to decl_with_vis and just document that it applies to FUNCTION_DECLs only. Or move some flag to cgraph if possible. But seeing e.g. IX86_BUILTIN_FIXUPIMMPD256, IX86_BUILTIN_FIXUPIMMPD256_MASK, IX86_BUILTIN_FIXUPIMMPD256_MASKZ etc. I wonder if you really need that many builtins, weren't we adding for avx512f just single builtin instead of 3 different ones, always providing mask argument and depending on whether it is all ones, etc. figuring out what kind of masking should be performed? Jakub