From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 83960 invoked by alias); 12 Jan 2016 13:38:25 -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 83937 invoked by uid 89); 12 Jan 2016 13:38:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=lay, Hx-languages-length:883, H*Ad:D*ru X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 12 Jan 2016 13:38:22 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 89E5DC0BF2DA; Tue, 12 Jan 2016 13:38:21 +0000 (UTC) Received: from tucnak.zalov.cz ([10.3.113.3]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0CDcJDw006031 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 12 Jan 2016 08:38:21 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id u0CDcHj0008759; Tue, 12 Jan 2016 14:38:18 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id u0CDcFHw008758; Tue, 12 Jan 2016 14:38:15 +0100 Date: Tue, 12 Jan 2016 13:38:00 -0000 From: Jakub Jelinek To: Alexander Monakov , GCC Patches , Martin Liska Subject: Re: [hsa 2/10] Modifications to libgomp proper Message-ID: <20160112133815.GJ3017@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20151207111758.GA24234@virgil.suse.cz> <20151207111957.GC24234@virgil.suse.cz> <20160112131039.GI3017@tucnak.redhat.com> <20160112132905.GM3060@virgil.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160112132905.GM3060@virgil.suse.cz> User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes X-SW-Source: 2016-01/txt/msg00721.txt.bz2 On Tue, Jan 12, 2016 at 02:29:06PM +0100, Martin Jambor wrote: > GOMP_kernel_launch_attributes should not be there (it is a > reminiscence from before the device-specific target arguments) and > should be moved just to the HSA plugin. I'll prepare a patch today. > > While we do not have to share GOMP_hsa_kernel_dispatch, we actually do > use them in both the plugin and the compiler, where we only use it in > an offsetof, so that we only have the structure defined once. But, even using it in offsetof might be wrong, the compiler could be a cross-compiler, and you'd use offsetof on the host, while you want it for the target, and that would be different. So, IMHO you need (unless you already have) built the structure as a tree type, lay it out, and then you can use at TYPE_SIZE_UNIT or DECL_FIELD_OFFSET and the like. Jakub