[PATCH] D69498: IR: Invert convergent attribute handling

Johannes Doerfert via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 29 12:44:19 PDT 2019


jdoerfert added a comment.

In D69498#1725819 <https://reviews.llvm.org/D69498#1725819>, @mehdi_amini wrote:

> Maybe we can start by looking into the motivation for this patch:
>
> > There is a burden on frontends in environments that care about convergent operations to add the attribute just in case it is needed. This has proven to be somewhat problematic, and different frontend projects have consistently run into problems related to this.
>
> Can you clarify what kind of problems? Do you have concrete examples?


The frontend has to put convergent on everything that is not known to be non-convergent right now. That is, the front-end and all function generating constructs need to know about convergent to preserve correctness. Dropping convergent is also not sound. Frontends in the past put convergent only on barriers or similar calls but not on all functions that might transitively call barriers, leading to subtle bugs.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69498/new/

https://reviews.llvm.org/D69498





More information about the cfe-commits mailing list