[llvm-dev] [RFC] `opt-out` attribute list for intrinsics

Stefan Stipanovic via llvm-dev llvm-dev at lists.llvm.org
Wed Jun 24 14:42:45 PDT 2020


Hi Nicolai,

Thanks for the reply.

While this sounds reasonable to me, I'm not sure that would work. Right now
these properties are bool flags that are initialized per Record and each
Record can only see properties from IntrProperties list.

If I'm missing something, please let me know.

Thanks,
Stefan

On Wed, Jun 24, 2020 at 7:01 PM Nicolai Hähnle <nhaehnle at gmail.com> wrote:

> Hi Stefan,
>
> On Wed, Jun 24, 2020 at 6:30 PM Stefan Stipanovic via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > A while back we started annotating intrinsics with new attributes (
> https://reviews.llvm.org/D65377)
> >
> > After some discussion it was decided it would be good to have an
> `opt-out` attribute list for intrinsics. Some attributes that can be added
> to the list could be: nosync, nofree, nounwind, willreturn
> >
> > For now, there are 2 approaches:
> >
> > Filtering opt-out attributes in tablegen source (
> https://reviews.llvm.org/D70365)
> > Having tablegen handle opt-out list (
> https://reviews.llvm.org/D70365?id=229732)
> >
> > How do people feel about these approaches? Is any of the two better than
> the other? Maybe I should consider something else?
>
> First of all, thank you for looking into this. I think either approach
> is fine, but tiven the prevalence of `let IntrProperties` in existing
> TableGen code, I'd lean slightly towards the approach where
> reconciling the opt-in and opt-out attributes is done by the TableGen
> backend.
>
> I'd recommend a slightly different tack to implementing that approach
> though: Add a isOptOut field to the IntrinsicProperty class, and have
> TableGen automatically determine the default attributes by looking for
> attributes that have this set to true.
>
> Cheers,
> Nicolai
>
>
> >
> > Thanks,
> > Stefan
> > _______________________________________________
> > LLVM Developers mailing list
> > llvm-dev at lists.llvm.org
> > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
>
> --
> Lerne, wie die Welt wirklich ist,
> aber vergiss niemals, wie sie sein sollte.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200624/0821e28b/attachment.html>


More information about the llvm-dev mailing list