2 ms·
fwiw, GCC now has -ffold-simple-inlines exactly for this issue.
by gpderetta 4y ago
fwiw, GCC now has -ffold-simple-inlines exactly for this issue.
- klodolph 4y agoThat’s not what -ffold-simple-inlines does. The -ffold-simple-inlines flag simply removes debugging information for certain inlined functions. It doesn’t affect whether the function is inlined in the first place. The result is that debug builds may have a smaller amount of debug information, but the code will be the same.
- gpderetta 4y agoThat's not my reading of the docs, which explicitly talk about folding. Also simple tests shows that it does indeed inline the call even in debug mode. In addition to inlining it also does also remove debug info.
- klodolph 4y agoYou may be right—I was reading the release notes, and the actual docs go into more detail about what the flag does.
- professoretc 4y agoThere's also the `artificial` attribute which instructs the debugger to skip through marked functions.