Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cut unconditional string-key indirection in FormattedKeyHolder
Summary: There are two optimizations within this one change in return type, assuming that the callee `FormattedKeyHolder::getFormattedKeyWithExtra` is not inline-expanded into the caller. * An indirection occurs within the callee, but the indirection would be needed only in the caller and only conditionally in a rare, slow path. If the callee is not inline-expanded into the caller, there may be no opportunity for the compiler to make the indirection itself conditional just like the usage of the indirection. This change returns the reference from the callee before indirection and allows the caller to indirect only conditionally. * The return type of the callee is too large to be passed via registers in the common ABIs, and so must be spilled to the stack. The maximum size is 2 pointers, but the return type is 3 pointers in size. This change modifies the return type to be 2 pointers in size, allowing the return value to be passed via registers and to skip the stack. Reviewed By: dddmello, DenisYaroshevskiy Differential Revision: D66175277 fbshipit-source-id: 7f3e7d8d48c40b6201458777b6702197168e307c
- Loading branch information