efriedma-quic wrote:

> I realize this is not the approach you had in mind, but it would at least be 
> nice to hear the reasoning as to why something more elaborate would be 
> preferred?

Manually writing addParamAttr markings doesn't scale; there's no easy way to 
audit whether everything has been appropriately ported.  A corrected API would 
automatically get the right markings.

Also, this isn't the same marking the standard codepath would generate in some 
cases, which might cause other issues.  (Adding sext for int is probably mostly 
right for existing targets, but it's not obviously right for all targets, and 
you'd need a different API for any interface that takes an unsigned integer.)

> A problem is that it seems theoretically possible that the created Function 
> is any other named Value in the module... Would it be ok to have the cast 
> fail in such a case?

The most likely case is that someone defines an alias... and in that case, I 
think we need the attribute on the call.

https://github.com/llvm/llvm-project/pull/111740
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to