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

Nicolai Hähnle via llvm-dev llvm-dev at lists.llvm.org
Wed Jun 24 10:01:27 PDT 2020


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.


More information about the llvm-dev mailing list