This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH v2 1/3] Allow memory operands for PTWRITE
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: Andi Kleen <andi at firstfloor dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Martin Sebor <msebor at gmail dot com>, Andi Kleen <ak at linux dot intel dot com>
- Date: Tue, 20 Nov 2018 11:53:15 +0100
- Subject: Re: [PATCH v2 1/3] Allow memory operands for PTWRITE
- References: <20181116035704.14820-1-andi@firstfloor.org> <20181116035704.14820-2-andi@firstfloor.org> <CAFULd4YYw2jdbEE7vDnto=3DvO2tiHO4KJQmOg7B+NUs-6qmow@mail.gmail.com>
On Fri, Nov 16, 2018 at 8:07 AM Uros Bizjak <ubizjak@gmail.com> wrote:
>
> On Fri, Nov 16, 2018 at 4:57 AM Andi Kleen <andi@firstfloor.org> wrote:
> >
> > From: Andi Kleen <ak@linux.intel.com>
> >
> > The earlier PTWRITE builtin definition was unnecessarily restrictive,
> > only allowing register input to PTWRITE. The instruction actually
> > supports memory operands too, so allow that too.
> >
> > gcc/:
> >
> > 2018-11-15 Andi Kleen <ak@linux.intel.com>
> >
> > * config/i386/i386.md: Allow memory operands to ptwrite.
>
> OK.
Btw, I wonder why the ptwrite builtin is in SPECIAL_ARGS2
commented as /* Add all special builtins with variable number of operands. */?
On the GIMPLE level this builtin also has quite some (bad) effects on
alias analysis and any related optimization (vectorization, etc.). I'll have
to see where the instrumenting pass now resides.
Richard.
> Thanks,
> Uros.
>
> > ---
> > gcc/config/i386/i386.md | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
> > index 44db8ac954c..9c359c0ca04 100644
> > --- a/gcc/config/i386/i386.md
> > +++ b/gcc/config/i386/i386.md
> > @@ -19501,7 +19501,7 @@
> > (set_attr "prefix_extra" "2")])
> >
> > (define_insn "ptwrite<mode>"
> > - [(unspec_volatile [(match_operand:SWI48 0 "register_operand" "r")]
> > + [(unspec_volatile [(match_operand:SWI48 0 "nonimmediate_operand" "rm")]
> > UNSPECV_PTWRITE)]
> > "TARGET_PTWRITE"
> > "ptwrite\t%0"
> > --
> > 2.19.1
> >