liuhongt <[email protected]> writes: > When APX_F is enabled the extra 16 GPRs make retaining %rbp as the > frame pointer essentially free, while keeping it improves unwind and > profiling quality. Default flag_omit_frame_pointer to 0 when
But the frame pointer setup / tear down is not free, it penalizes small functions. This would need a lot more benchmarking. What would probably make sense is an adaptive policy. When the function is large and has a lot of stack accesses then frame pointer references are one byte shorter than RSP references in x86, and the setup/teardown does not matter. So in this case it could be switched on. I believe some other compilers do it this way. But I'm not sure if there's an easy/cheap way to implement this in gcc. -Andi
