3 ms·
Doesn't LTO do some of these things?
by ndesaulniers 11y ago
Doesn't LTO do some of these things?
- vardump 11y agoI was talking about runtime executable optimization. In general, I don't think this is possible at link time. If the binary is linked in 2015, it's not possible to know about CPUs available in 2035 or to utilize the new features, even if they're binary compatible. Compiling (incl. linking) bakes in assumptions about target CPU. If these assumptions are incorrect, the performance will be sub-optimal. Even pathologic cases are possible, like order of magnitude lower performance in AMD Jaguar AVX stores. CPUs have wildly different combinations of instruction set extensions. Instruction throughput and latency varies significantly. Cache subsystems are different. So code that runs well on one CPU can run sub-optimally on another binary-compatible CPU.
- jevinskie 11y agoThe LTOs I know of always operate on an IR like LLVM or GIMPLE, not binary code.