Stefan Stipanovic via llvm-dev
2020-Jun-24 16:28 UTC
[llvm-dev] [RFC] `opt-out` attribute list for intrinsics
Hi all, 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: 1. Filtering opt-out attributes in tablegen source ( https://reviews.llvm.org/D70365) 2. 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? Thanks, Stefan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200624/cefabff9/attachment.html>
Nicolai Hähnle via llvm-dev
2020-Jun-24 17:01 UTC
[llvm-dev] [RFC] `opt-out` attribute list for intrinsics
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.
Johannes Doerfert via llvm-dev
2020-Jun-24 18:11 UTC
[llvm-dev] [RFC] `opt-out` attribute list for intrinsics
No strong opinion on the tablegen implementation choice but very much in favor of "default attributes" for intrinsics. There is a valid correctness concern but I would argue the attributes show up in the intrinisc test when you add them. If they seem off, you need to opt-out. On 6/24/20 11:28 AM, Stefan Stipanovic wrote:> Hi all, > > 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: > > 1. Filtering opt-out attributes in tablegen source ( > https://reviews.llvm.org/D70365) > 2. 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? > > Thanks, > Stefan >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200624/a726b6fa/attachment-0001.html>
Stefan Stipanovic via llvm-dev
2020-Jun-24 21:42 UTC
[llvm-dev] [RFC] `opt-out` attribute list for intrinsics
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>
Stefan Stipanovic via llvm-dev
2020-Aug-17 16:21 UTC
[llvm-dev] [RFC] `opt-out` attribute list for intrinsics
[Update] I've created https://reviews.llvm.org/D86021 which makes nofree, nosync and willreturn default attributes for intrinsics. I've also opted out of default attributes for some target independent intrinsics. Please feel free to comment on the review. Thanks, Stefan On Wed, Jun 24, 2020 at 6:28 PM Stefan Stipanovic <stefomeister at gmail.com> wrote:> Hi all, > > 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: > > 1. Filtering opt-out attributes in tablegen source ( > https://reviews.llvm.org/D70365) > 2. 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? > > Thanks, > Stefan >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200817/a37087d8/attachment.html>
Possibly Parallel Threads
- LLVM 11 and trunk selecting 4 wide instead of 8 wide loop vectorization for AVX-enabled target
- LLVM 11 and trunk selecting 4 wide instead of 8 wide loop vectorization for AVX-enabled target
- [RFC] A nofree (and nosynch) function attribute: Mixing dereferenceable and delete
- LLVM 11 and trunk selecting 4 wide instead of 8 wide loop vectorization for AVX-enabled target
- Global removal pass - potential for improvement?