[llvm] Added const reference for params wth size >= 16 bytes (PR #125074)

Herman Semenoff via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 30 08:45:33 PST 2025


GermanAizek wrote:


> I think you need consensus on the idea that 16 bytes is a reasonably boundary. I'm not convinced it is. Certainly, I don't think a 16-byte struct should be passed by `const &` unconditionally.

This has already been discussed in the context of the C language and simple structures, but in the case of C++, everything is different. 
https://www.reddit.com/r/C_Programming/comments/14ki3vl/returning_a_16_byte_struct_vs_passing_a_pointer/

I'll create a topic on the forum, let's see how most people respond.

https://github.com/llvm/llvm-project/pull/125074


More information about the llvm-commits mailing list