Optimize away is_nonconst_rvalue
bit for copied in
parameters
#12
Labels
prototype-codegen-quality
Code generation quality
When an
in
parameter is copied (type is small and trivially copyable), there's no need to pass an extra bit to remember whether it was a non-const rvalue.Repro 1, extra instruction at the call site for an
in int
parameter: https://cppx.godbolt.org/z/fz78YWRepro 2, two extra instructions in the callee for an
in int
parameter: https://cppx.godbolt.org/z/c8rYdYThe text was updated successfully, but these errors were encountered: