An interesting "optimization"? for __glibcxx_assert under verbose mode

unlvsur unlvsur unlvsur@live.com
Fri Oct 15 00:30:19 GMT 2021


I think the parameter can be just embedded in the symbol name of the function. This improves code gen and make optimizers happier under -Os.

But it only works under C++20.

This is a proven concept. It works for both gcc and clang

https://godbolt.org/z/s35s8MTac

https://godbolt.org/z/5KK5PzMEj
Os:
https://godbolt.org/z/4MjGdTajf

https://godbolt.org/z/crfWf41vc
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows



More information about the Libstdc++ mailing list