mehdi_amini added a comment.

In D69498#1735763 <https://reviews.llvm.org/D69498#1735763>, @arsenm wrote:

> In D69498#1731265 <https://reviews.llvm.org/D69498#1731265>, @mehdi_amini 
> wrote:
>
> > 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).
>
>
> This sounds almost too low level. The bitcode loading of a function shouldn’t 
> be adding attributes to non-intrinsics, otherwise it’s changing the meaning 
> of the program and not preserving the input


You're right, but I thought loading a function from bitcode would be 1) create 
the function (it may get a default convergent attribute added) and 2) set the 
exact attributes (which would override the default)


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