nikic wrote:

> How do IR-level optimizations react when the caller and callee attributes 
> don't match? I just tried briefly scanning... I didn't find much.

I don't believe anything at the IR level currently cares about this. It only 
checks for function type compatibility, not ABI attributes. (Which is something 
I'd like to improve, but we can encode that some asymmetric ABI attributes are 
actually compatible at that point.)

The only place that comes to mind is the Lint pass. That should be changed to 
ignore this particular mismatch as benign.

> It looks like this only applies to arguments, not return values? Is there an 
> equivalent issue for return values?

Thankfully, the issue is argument-only. Return values were already handled 
correctly on previous Clang versions, even though this was not at all obvious 
from the IR. This was clarified in 
https://github.com/llvm/llvm-project/pull/232729.

https://github.com/llvm/llvm-project/pull/236450
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to