public inbox for jit@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: why does gcc jit require pthread?
       [not found]           ` <CAH6eHdSn2y+KnqLpFVLLtZxt9zxTu3bY89gaxERwqSxhjUcdTA@mail.gmail.com>
@ 2022-11-15 18:50             ` David Malcolm
  2022-11-15 19:01               ` Jonathan Wakely
  0 siblings, 1 reply; 3+ messages in thread
From: David Malcolm @ 2022-11-15 18:50 UTC (permalink / raw)
  To: Jonathan Wakely, LIU Hao; +Cc: Andrew Pinski, gcc, gcc-patches, jit

[Fixing typo in the Subject ("git" -> "jit" ); CCing jit mailing list]

On Fri, 2022-11-11 at 17:16 +0000, Jonathan Wakely wrote:
> On Mon, 7 Nov 2022 at 13:51, Jonathan Wakely wrote:
> > 
> > On Mon, 7 Nov 2022 at 13:33, LIU Hao wrote:
> > > 
> > > 在 2022-11-07 20:57, Jonathan Wakely 写道:
> > > > It would be a lot nicer if playback::context met the C++
> > > > Lockable
> > > > requirements, and playback::context::compile () could just take
> > > > a
> > > > scoped lock on *this:
> > > > 
> > > > 
> > > 
> > > Yeah yeah that makes a lot of sense. Would you please just commit
> > > that? I don't have write access to
> > > GCC repo, and it takes a couple of hours for me to bootstrap GCC
> > > just for this tiny change.
> > 
> > Somebody else needs to approve it first. I'll combine our patches
> > and
> > test and submit it properly for approval.
> 
> Here's a complete patch that actually builds now, although I'm seeing
> a stage 2 vs stage 3 comparison error which I don't have time to look
> into right now.

I confess that I'm not familiar with C++11's mutex and locking types,
but having read through the relevant entries on cppreference.com, the
patch looks correct to me.

Are these classes well-supported on the minimum compiler version we
support?  (Jonathan, I defer to your judgement here)

Jonathan: you said in your followup email that it "bootstraps and
passes testing on x86_64-pc-linux-gnu (CentOS 8 Stream)".  This is
possibly a silly question, but did this testing include the jit
testsuite?  A gotcha here is that --enable-languages=all does *not*
enable jit.

The patch is OK for trunk if you have favorable answers for the above
two questions.

Thanks!
Dave


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: why does gcc jit require pthread?
  2022-11-15 18:50             ` why does gcc jit require pthread? David Malcolm
@ 2022-11-15 19:01               ` Jonathan Wakely
  2022-11-19 11:27                 ` Jonathan Wakely
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Wakely @ 2022-11-15 19:01 UTC (permalink / raw)
  To: David Malcolm; +Cc: LIU Hao, Andrew Pinski, gcc, gcc-patches, jit

On Tue, 15 Nov 2022 at 18:50, David Malcolm <dmalcolm@redhat.com> wrote:
>
> [Fixing typo in the Subject ("git" -> "jit" ); CCing jit mailing list]
>
> On Fri, 2022-11-11 at 17:16 +0000, Jonathan Wakely wrote:
> > On Mon, 7 Nov 2022 at 13:51, Jonathan Wakely wrote:
> > >
> > > On Mon, 7 Nov 2022 at 13:33, LIU Hao wrote:
> > > >
> > > > 在 2022-11-07 20:57, Jonathan Wakely 写道:
> > > > > It would be a lot nicer if playback::context met the C++
> > > > > Lockable
> > > > > requirements, and playback::context::compile () could just take
> > > > > a
> > > > > scoped lock on *this:
> > > > >
> > > > >
> > > >
> > > > Yeah yeah that makes a lot of sense. Would you please just commit
> > > > that? I don't have write access to
> > > > GCC repo, and it takes a couple of hours for me to bootstrap GCC
> > > > just for this tiny change.
> > >
> > > Somebody else needs to approve it first. I'll combine our patches
> > > and
> > > test and submit it properly for approval.
> >
> > Here's a complete patch that actually builds now, although I'm seeing
> > a stage 2 vs stage 3 comparison error which I don't have time to look
> > into right now.
>
> I confess that I'm not familiar with C++11's mutex and locking types,
> but having read through the relevant entries on cppreference.com, the
> patch looks correct to me.
>
> Are these classes well-supported on the minimum compiler version we
> support?  (Jonathan, I defer to your judgement here)

std::mutex has been supported since 4.4.0 and is very simple. The
implementation on trunk is identical to the one in gcc 4.8.5 except
for adding 'noexcept' to mutex::native_handle (), which is not
relevant to this change.

> Jonathan: you said in your followup email that it "bootstraps and
> passes testing on x86_64-pc-linux-gnu (CentOS 8 Stream)".  This is
> possibly a silly question, but did this testing include the jit
> testsuite?  A gotcha here is that --enable-languages=all does *not*
> enable jit.

Yes, I built with --enable-languages=c,c++,jit --enable-host-shared

> The patch is OK for trunk if you have favorable answers for the above
> two questions.
>
> Thanks!
> Dave
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: why does gcc jit require pthread?
  2022-11-15 19:01               ` Jonathan Wakely
@ 2022-11-19 11:27                 ` Jonathan Wakely
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Wakely @ 2022-11-19 11:27 UTC (permalink / raw)
  To: David Malcolm; +Cc: LIU Hao, Andrew Pinski, gcc, gcc-patches, jit

On Tue, 15 Nov 2022 at 19:01, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>
> On Tue, 15 Nov 2022 at 18:50, David Malcolm <dmalcolm@redhat.com> wrote:
> >
> > [Fixing typo in the Subject ("git" -> "jit" ); CCing jit mailing list]
> >
> > On Fri, 2022-11-11 at 17:16 +0000, Jonathan Wakely wrote:
> > > On Mon, 7 Nov 2022 at 13:51, Jonathan Wakely wrote:
> > > >
> > > > On Mon, 7 Nov 2022 at 13:33, LIU Hao wrote:
> > > > >
> > > > > 在 2022-11-07 20:57, Jonathan Wakely 写道:
> > > > > > It would be a lot nicer if playback::context met the C++
> > > > > > Lockable
> > > > > > requirements, and playback::context::compile () could just take
> > > > > > a
> > > > > > scoped lock on *this:
> > > > > >
> > > > > >
> > > > >
> > > > > Yeah yeah that makes a lot of sense. Would you please just commit
> > > > > that? I don't have write access to
> > > > > GCC repo, and it takes a couple of hours for me to bootstrap GCC
> > > > > just for this tiny change.
> > > >
> > > > Somebody else needs to approve it first. I'll combine our patches
> > > > and
> > > > test and submit it properly for approval.
> > >
> > > Here's a complete patch that actually builds now, although I'm seeing
> > > a stage 2 vs stage 3 comparison error which I don't have time to look
> > > into right now.
> >
> > I confess that I'm not familiar with C++11's mutex and locking types,
> > but having read through the relevant entries on cppreference.com, the
> > patch looks correct to me.
> >
> > Are these classes well-supported on the minimum compiler version we
> > support?  (Jonathan, I defer to your judgement here)
>
> std::mutex has been supported since 4.4.0 and is very simple. The
> implementation on trunk is identical to the one in gcc 4.8.5 except
> for adding 'noexcept' to mutex::native_handle (), which is not
> relevant to this change.
>
> > Jonathan: you said in your followup email that it "bootstraps and
> > passes testing on x86_64-pc-linux-gnu (CentOS 8 Stream)".  This is
> > possibly a silly question, but did this testing include the jit
> > testsuite?  A gotcha here is that --enable-languages=all does *not*
> > enable jit.
>
> Yes, I built with --enable-languages=c,c++,jit --enable-host-shared

I rebased the patch and re-tested with those options, and all tests
passed again:


               === jit Summary ===

# of expected passes            15081




> > The patch is OK for trunk if you have favorable answers for the above
> > two questions.

Thanks, I've pushed it to trunk now.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-19 11:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <8f15b063-9ec8-59e0-590b-20e416f68cb4@126.com>
     [not found] ` <CA+=Sn1ncp6hN8MnziZ+2f-6_UUqMwXeVGQLmft2NUeuXGOaBoA@mail.gmail.com>
     [not found]   ` <98c69fc7-713f-a09a-8ca7-c3e64bdfd309@126.com>
     [not found]     ` <CAH6eHdTh4AhabR1o1pF6-wyTgH-59W_ZLPnspe=ytO_4UY3LEQ@mail.gmail.com>
     [not found]       ` <0c6b1411-fa35-1c2f-16f2-f26b6e6cedaa@126.com>
     [not found]         ` <CAH6eHdSbUTk636yj=zgp-z1ra2Z38T-KWPNKPaW=gWBfYegnwA@mail.gmail.com>
     [not found]           ` <CAH6eHdSn2y+KnqLpFVLLtZxt9zxTu3bY89gaxERwqSxhjUcdTA@mail.gmail.com>
2022-11-15 18:50             ` why does gcc jit require pthread? David Malcolm
2022-11-15 19:01               ` Jonathan Wakely
2022-11-19 11:27                 ` Jonathan Wakely

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).