This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: GOMP_target: alignment (was: [gomp4] #pragma omp target* fixes)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Thomas Schwinge <thomas at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Richard Henderson <rth at redhat dot com>, "Michael V. Zolotukhin" <michael dot v dot zolotukhin at gmail dot com>, jnorris at codesourcery dot com
- Date: Tue, 17 Dec 2013 20:35:44 +0100
- Subject: Re: GOMP_target: alignment (was: [gomp4] #pragma omp target* fixes)
- Authentication-results: sourceware.org; auth=none
- References: <20130905161105 dot GL23437 at tucnak dot redhat dot com> <87zjo6s8e9 dot fsf at kepler dot schwinge dot homeip dot net> <87fvptqm41 dot fsf at kepler dot schwinge dot homeip dot net> <20131216153818 dot GM892 at tucnak dot redhat dot com> <87iouoiwiv dot fsf at schwinge dot name> <20131216165826 dot GP892 at tucnak dot redhat dot com> <87y53jgu5m dot fsf at schwinge dot name>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Dec 17, 2013 at 08:21:57PM +0100, Thomas Schwinge wrote:
> On Mon, 16 Dec 2013 17:58:26 +0100, Jakub Jelinek <jakub@redhat.com> wrote:
> > I'd indeed prefer if you just used one
> > array, it can be say just uchar array of twice the width, with even chars
> > for alignment and odd for kinds (or vice versa), compared to two arrays
> > it is tiny bit cheaper at the caller side IMHO.
>
> Like this, for gomp-4_0-branch? Is hard-coding a shift by eight bits OK,
> or am I to fiddle with CHAR_TYPE_SIZE, and the like?
I think shift by 8 bits is fine, I believe 8 bits is the minimum a char can
have and it is better if you have a constant you can use on both sides.
Jakub