painful llvm x86 bugs

76 views
Skip to first unread message

Nick Desaulniers

unread,
Aug 16, 2021, 6:56:24 PM8/16/21
to aa...@aaronballman.com, clang-built-linux, Bill Wendling, craig....@sifive.com
Aaron,
I'm overjoyed to hear you landed at Intel! I was doing a bug scrub of
some of the missing features used by the Linux kernel that GCC
supports but LLVM doesn't. Is there any chance that you can have some
folks on Intel's LLVM team take a look at some of the more x86
specific ones?

* -mno-fp-ret-in-387: https://bugs.llvm.org/show_bug.cgi?id=51498
* -mskip-rax-setup: https://bugs.llvm.org/show_bug.cgi?id=23258
* -maccumulate-outgoing-args: https://bugs.llvm.org/show_bug.cgi?id=28145
* __builtin_ia32_readeflags_u64() unnecessarily forces a frame
pointer: https://bugs.llvm.org/show_bug.cgi?id=47531
* Inline asm constraint alternatives ignored:
https://bugs.llvm.org/show_bug.cgi?id=20197

The last two in particular hurt virtualization; reading/writing eflags
is significant overhead in virtualization on x86 and with LLVM due to
those last 2 links we don't have a way to read/write them as
efficiently as possible (as GCC).

--
Thanks,
~Nick Desaulniers

Fāng-ruì Sòng

unread,
Aug 16, 2021, 11:43:20 PM8/16/21
to Nick Desaulniers, aa...@aaronballman.com, clang-built-linux, Bill Wendling, craig....@sifive.com
Forwarded this message to some Intel folks...

--
You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-li...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/CAKwvOd%3D8w_nnQpbY2Yyg35oY8j%2BK0yL6K32Cd9wYLp2VTvQjXw%40mail.gmail.com.


--
宋方睿

Aaron Ballman

unread,
Aug 17, 2021, 6:29:40 AM8/17/21
to Nick Desaulniers, clang-built-linux, Bill Wendling, craig....@sifive.com
On Mon, Aug 16, 2021 at 6:56 PM Nick Desaulniers
<ndesau...@google.com> wrote:
>
> Aaron,
> I'm overjoyed to hear you landed at Intel!

Thanks! It's been a good fit so far.

> I was doing a bug scrub of
> some of the missing features used by the Linux kernel that GCC
> supports but LLVM doesn't. Is there any chance that you can have some
> folks on Intel's LLVM team take a look at some of the more x86
> specific ones?

Sure, I can pass these along to folks internally. No guarantees on any
action on them, but I can at least prod folks. Thanks for getting in
touch about them!

~Aaron

Nick Desaulniers

unread,
Aug 17, 2021, 1:21:56 PM8/17/21
to Aaron Ballman, clang-built-linux, Bill Wendling, craig....@sifive.com
On Tue, Aug 17, 2021 at 3:29 AM Aaron Ballman <aa...@aaronballman.com> wrote:
>
> On Mon, Aug 16, 2021 at 6:56 PM Nick Desaulniers
> <ndesau...@google.com> wrote:
> >
> > I was doing a bug scrub of
> > some of the missing features used by the Linux kernel that GCC
> > supports but LLVM doesn't. Is there any chance that you can have some
> > folks on Intel's LLVM team take a look at some of the more x86
> > specific ones?
>
> Sure, I can pass these along to folks internally. No guarantees on any
> action on them, but I can at least prod folks. Thanks for getting in
> touch about them!
>

Totally; we meet with ARM every other week. I wish we had that
relationship with Intel. Once we get a build up of bugs that are very
architecture-specific I try to reach out to some of the folks working
on those backends. Next up is for me to reach out to Ulrich and
Nemanja at IBM about some s390 and PPC bugs.

>
> > * -mno-fp-ret-in-387: https://bugs.llvm.org/show_bug.cgi?id=51498
> > * -mskip-rax-setup: https://bugs.llvm.org/show_bug.cgi?id=23258
> > * -maccumulate-outgoing-args: https://bugs.llvm.org/show_bug.cgi?id=28145
> > * __builtin_ia32_readeflags_u64() unnecessarily forces a frame
> > pointer: https://bugs.llvm.org/show_bug.cgi?id=47531
> > * Inline asm constraint alternatives ignored:
> > https://bugs.llvm.org/show_bug.cgi?id=20197
> >
> > The last two in particular hurt virtualization; reading/writing eflags
> > is significant overhead in virtualization on x86 and with LLVM due to
> > those last 2 links we don't have a way to read/write them as
> > efficiently as possible (as GCC).
> >
> > --
> > Thanks,
> > ~Nick Desaulniers



--
Thanks,
~Nick Desaulniers

Aaron Ballman

unread,
Aug 17, 2021, 1:38:33 PM8/17/21
to Nick Desaulniers, clang-built-linux, Bill Wendling, craig....@sifive.com
On Tue, Aug 17, 2021 at 1:22 PM Nick Desaulniers
<ndesau...@google.com> wrote:
>
> On Tue, Aug 17, 2021 at 3:29 AM Aaron Ballman <aa...@aaronballman.com> wrote:
> >
> > On Mon, Aug 16, 2021 at 6:56 PM Nick Desaulniers
> > <ndesau...@google.com> wrote:
> > >
> > > I was doing a bug scrub of
> > > some of the missing features used by the Linux kernel that GCC
> > > supports but LLVM doesn't. Is there any chance that you can have some
> > > folks on Intel's LLVM team take a look at some of the more x86
> > > specific ones?
> >
> > Sure, I can pass these along to folks internally. No guarantees on any
> > action on them, but I can at least prod folks. Thanks for getting in
> > touch about them!
> >
>
> Totally; we meet with ARM every other week. I wish we had that
> relationship with Intel. Once we get a build up of bugs that are very
> architecture-specific I try to reach out to some of the folks working
> on those backends. Next up is for me to reach out to Ulrich and
> Nemanja at IBM about some s390 and PPC bugs.

Ah, that's good to know that you meet regularly with ARM. I've passed
your list of bugs over to Andy Kaylor internally, but he's not gotten
back to me about the message yet. So at least the ball is slowly
starting to roll.

~Aaron

Annita Zhang

unread,
Aug 18, 2021, 3:38:21 AM8/18/21
to Clang Built Linux
Hi Nick,

We got the message from Aaron, Andy Kaylor and Fangrui Song. We'd like to have a discussion with you for the requirement and specific issues. Can we set up a meeting for it?

- Annita

Aaron Ballman

unread,
Aug 18, 2021, 9:39:38 AM8/18/21
to Nick Desaulniers, clang-built-linux, Bill Wendling, craig....@sifive.com
On Tue, Aug 17, 2021 at 1:38 PM Aaron Ballman <aa...@aaronballman.com> wrote:
>
> On Tue, Aug 17, 2021 at 1:22 PM Nick Desaulniers
> <ndesau...@google.com> wrote:
> >
> > On Tue, Aug 17, 2021 at 3:29 AM Aaron Ballman <aa...@aaronballman.com> wrote:
> > >
> > > On Mon, Aug 16, 2021 at 6:56 PM Nick Desaulniers
> > > <ndesau...@google.com> wrote:
> > > >
> > > > I was doing a bug scrub of
> > > > some of the missing features used by the Linux kernel that GCC
> > > > supports but LLVM doesn't. Is there any chance that you can have some
> > > > folks on Intel's LLVM team take a look at some of the more x86
> > > > specific ones?
> > >
> > > Sure, I can pass these along to folks internally. No guarantees on any
> > > action on them, but I can at least prod folks. Thanks for getting in
> > > touch about them!
> > >
> >
> > Totally; we meet with ARM every other week. I wish we had that
> > relationship with Intel. Once we get a build up of bugs that are very
> > architecture-specific I try to reach out to some of the folks working
> > on those backends. Next up is for me to reach out to Ulrich and
> > Nemanja at IBM about some s390 and PPC bugs.
>
> Ah, that's good to know that you meet regularly with ARM. I've passed
> your list of bugs over to Andy Kaylor internally, but he's not gotten
> back to me about the message yet. So at least the ball is slowly
> starting to roll.

I've heard back from Andy and he said he's happy to have some folks
take a look. I also mentioned that you have regular meetings with ARM
on this sort of thing and are hoping to do the same with Intel, so
we'll see if I can make some introductions between you and the right
backend folks here to get something set up if possible.

~Aaron

Nick Desaulniers

unread,
Aug 26, 2021, 1:59:10 PM8/26/21
to Annita Zhang, Clang Built Linux, Stephen Hines
On Wed, Aug 18, 2021 at 12:38 AM Annita Zhang <annita...@gmail.com> wrote:
>
> Hi Nick,
>
> We got the message from Aaron, Andy Kaylor and Fangrui Song. We'd like to have a discussion with you for the requirement and specific issues. Can we set up a meeting for it?

Hi Annita,
Sorry for the delay; I took time off while family was in town. Yes,
I'd love to set up time to chat more. I'm located in the Pacific time
zone; are you? If so, do you have time Tuesday August 31 before noon?
Otherwise September 1 after 3pm might work for us. We're also happy
to accommodate any timezone differences.
> --
> You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-li...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/55b27a4f-67d6-48b9-84ed-e1ab95ae42c0n%40googlegroups.com.



--
Thanks,
~Nick Desaulniers

Annita Zhang

unread,
Sep 3, 2021, 2:25:37 AM9/3/21
to Clang Built Linux
Hi Nick,

Sorry I missed your email as I was on vacation last Friday. I'm in China time zone. My colleague, Andy Kaylor is in the same time zone with you. I will sync with him and propose some time slots to meet next week. Does it work for you?

Thx,
Annita

Nick Desaulniers

unread,
Sep 14, 2021, 12:50:32 PM9/14/21
to Annita Zhang, Clang Built Linux
On Thu, Sep 2, 2021 at 11:25 PM Annita Zhang <annita...@gmail.com> wrote:
>
> Hi Nick,
>
> Sorry I missed your email as I was on vacation last Friday. I'm in China time zone. My colleague, Andy Kaylor is in the same time zone with you. I will sync with him and propose some time slots to meet next week. Does it work for you?

Hi Annita,
This week and next week are full of technical conferences for the
Linux kernel; my schedule is packed. Perhaps we could sync up after?
https://www.timeanddate.com/worldclock/meetingtime.html?iso=20210927&p1=283&p2=33
I'm very happy to meet in the evening or at night (rather than very early).
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/46627d85-ffe9-4d1b-a90a-611d2f774c47n%40googlegroups.com.



--
Thanks,
~Nick Desaulniers

Annita Zhang

unread,
Sep 18, 2021, 4:07:14 AM9/18/21
to Nick Desaulniers, Clang Built Linux
Hi Nick,

I talked to Andy Kaylor. He plans to schedule a meeting with you, me and Pengfei. Since you are busy these 2 weeks, I think we can meet in ww40. @andrew...@intel.com

Thx,
Annita
Reply all
Reply to author
Forward
0 new messages