mehdi_amini added a comment.

In D69498#1727650 <https://reviews.llvm.org/D69498#1727650>, @dexonsmith wrote:

> In D69498#1723606 <https://reviews.llvm.org/D69498#1723606>, @rjmccall wrote:
>
> > Perhaps there should be a global metadata, or something in the 
> > increasingly-misnamed "data layout" string, which says that convergence is 
> > meaningful, and we should only add the attribute in appropriately-annotated 
> > modules?
>
>
> Just wanted to resurface these alternatives from John.  Given that some 
> targets want a fundamentally different default from what most frontends 
> expect, I think we ought to find some way to encode the difference.


Just thought about a slight variation on this: what about adding a flag on the 
datalayout (or a module flag) but not use it in the transformations/analyses, 
instead use it only when creating Function by always setting the `convergent` 
attribute when the flag is present? This would require to always have a Module 
passed to the Function constructor though (the C API already does, we would 
just need to update the C++ users).

So creating a Function in a Module with this flag would have the convergent 
attribute set on creation (can be unset explicitly).


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

https://reviews.llvm.org/D69498



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to