Jakub Czapiga has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/68923 )
Change subject: acpigen: Always inline helper functions ......................................................................
Patch Set 3:
(1 comment)
Commit Message:
https://review.coreboot.org/c/coreboot/+/68923/comment/9dc25e9f_f88139ef PS3, Line 12: normally
I am no compiler expert, but aren’t todays compilers do pretty unexpected choices regarding these th […]
Hi Paul. I see there is a need for some backstory for this change:
In free time I'm working on a profiler for coreboot (CB:65606). I had problems with inline functions in headers. I had to modify acpigen.h the same way as I did here to make it compile correctly, because GCC was sometimes treating these functions as inline and sometimes it did not. Making them force-inlined simply solved the problem. Also, that was my inent when I was introducing these functions. They had to be simple readable wrappers (macros were rejected during review) and never used the other way.
I want to provide way to enable or disable profiling of inline functions (reaaaaly expensive, but might be useful in rare cases), so it should work at least with common code.
Regarding things compilers do to optimize code: Yes, they do pretty wild stuff these days, but this change is more related to linking process than compilation alone, because builds were failing during linking stage.