Add builtin likely to assertions

Aditya K hiraditya@msn.com
Wed Jul 29 02:19:27 GMT 2020


> This is not needed for GCC to do the correct thing as __assert_fail is
> marked as noreturn and GCC heuristics for branch prediction already
> predicts it correctly and has done since at least 4.4 (or even
> beforehand).
> Can you explain more on which compiler this helps with?

I saw this pattern in 'MacOSX.sdk/usr/include/assert.h', so added here. I don't have any test case to show a different layout with this patch.

-Aditya


More information about the Libc-alpha mailing list