4 ms·
The technique itself isn't new in clang either. This is about a new implementation of it, where the difference to the existing implementation is that this happ
by caf 6y ago
The technique itself isn't new in clang either. This is about a new implementation of it, where the difference to the existing implementation is that this happens later in the process (it's deferred to the machine-specific code generation phase, whereas the existing implementation happens in the middle-end and is target-agnostic).
- vlovich123 6y agoThe other major piece is that the hot-cold split is more efficient. Rather than thunking out the cold code via a function call it just jumps to the basic block, making it a more efficient approach (no register spilling and function call overhead)
- caf 6y agoThe function call overhead itself is irrelevant, because by definition these blocks are cold. The saving/restoring of callee-clobbered registers does affect the code size of the hot function though, so that's important.
- labawi 6y agoBlocks are cold by an imprecise measurement. Decreasing the downside means you can apply the hopefully-optimisation more aggressively for more gain so I would expect it to matter.
- deleted 6y ago[deleted]