public inbox for jit@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
To: David Malcolm <dmalcolm@redhat.com>, Antoni Boucher <bouanto@zoho.com>
Cc: jit@gcc.gnu.org
Subject: Re: [PATCH] libgccjit: Add support for setting the alignment [PR104293]
Date: Wed, 13 Apr 2022 13:47:46 +0200	[thread overview]
Message-ID: <8BB230BB-AC78-4B79-8B01-44714A53B8DF@gmail.com> (raw)
In-Reply-To: <0daad6110a15a9aab4e924c415405547248cd873.camel@redhat.com>

On 12 April 2022 23:51:34 CEST, David Malcolm via Gcc-patches <gcc-patches@gcc.gnu.org> wrote:
>On Sat, 2022-04-09 at 13:50 -0400, Antoni Boucher wrote:
>> Here's the updated patch.
>> 

>I've pushed the patch to trunk for GCC 12 as r12-8120-g6e5ad1cc24a315.
>
>https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=6e5ad1cc24a315d07f24c95d76c269cafe2a8182


>> > > +   in C, but in bits instead of bytes.
>> > 
>> > If we're doing it in bytes, this will need updating, of course.
>> > 
>> > Maybe rename the int param from "alignment" to "bytes" to make this
>> > clearer.
>> > 
>> > Probably should be unsigned as well.

>> > > +void
>> > > +gcc_jit_lvalue_set_alignment (gcc_jit_lvalue *lvalue,
>> > > +                             int alignment)
>> > > +{
>> > > +  RETURN_IF_FAIL (lvalue, NULL, NULL, "NULL lvalue");
>> > 
>> > Should the alignment be unsigned?  What if the user passes in
>> > negative?
>> > 
>> > Does it have to be a power of two?  If so, ideally we should reject
>> > non-power-of-two here.

The wrapper was changed to unsigned bytes.
set_alignment still takes int bytes AFAICS?

Now I think there are or may be machine dependent max alignment, aren't there? If there are, they are enforced later in the pipeline I assume?

thanks,

  reply	other threads:[~2022-04-13 11:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-31  1:38 Antoni Boucher
2022-04-08 19:01 ` David Malcolm
2022-04-09 17:50   ` Antoni Boucher
2022-04-12 21:51     ` David Malcolm
2022-04-13 11:47       ` Bernhard Reutner-Fischer [this message]
2022-04-16 20:26         ` Marc Nieper-Wißkirchen
2022-04-17  2:28           ` Antoni Boucher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8BB230BB-AC78-4B79-8B01-44714A53B8DF@gmail.com \
    --to=rep.dot.nop@gmail.com \
    --cc=bouanto@zoho.com \
    --cc=dmalcolm@redhat.com \
    --cc=jit@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).