From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7100 invoked by alias); 21 Oct 2014 09:17:35 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 7089 invoked by uid 89); 21 Oct 2014 09:17:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f169.google.com Received: from mail-wi0-f169.google.com (HELO mail-wi0-f169.google.com) (209.85.212.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 21 Oct 2014 09:17:33 +0000 Received: by mail-wi0-f169.google.com with SMTP id r20so1332657wiv.4 for ; Tue, 21 Oct 2014 02:17:29 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.180.106.10 with SMTP id gq10mr17822659wib.5.1413883048766; Tue, 21 Oct 2014 02:17:28 -0700 (PDT) Received: by 10.194.20.74 with HTTP; Tue, 21 Oct 2014 02:17:28 -0700 (PDT) In-Reply-To: <20141020135019.GP10376@tucnak.redhat.com> References: <20141020134122.GB12661@msticlxl57.ims.intel.com> <20141020135019.GP10376@tucnak.redhat.com> Date: Tue, 21 Oct 2014 09:19:00 -0000 Message-ID: Subject: Re: [PATCH i386 AVX512] [81/n] Add new built-ins. From: Richard Biener To: Jakub Jelinek Cc: Kirill Yukhin , Uros Bizjak , Richard Henderson , GCC Patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg02018.txt.bz2 On Mon, Oct 20, 2014 at 3:50 PM, Jakub Jelinek wrote: > 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? If only we had no lang-specific flags in tree_base we could use the same place as we use for internal function code ... But yes, not using that many builtins in the first place is preferred for example by making them type-generic and/or variadic. Richard. > Jakub