zygoloid wrote:

NRVO vs not-NRVO is not an ABI difference, just a behavior difference -- it 
doesn't change the calling convention, and different choices here are 
link-compatible (in C++ we can make different choices for different emissions 
of the same inline function even).

This is also not a potentially breaking change in the sense that it was always 
an optional optimization. But it's breaking in the sense that it's an 
observable behavior change in our default mode.

Instead of forcing this off for C compilations, how would you feel about 
instead changing the default for `-felide-constructors` to be off for C, so 
people can still re-enable the optimization to avoid performance / stack usage 
regressions? (Weird flag name for C, I know; maybe we should also think about 
adding an alias such as `-felide-return-copies`.)

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

Reply via email to