News for hackers. Stuff that matters.
Re:Future Directions for Optimizing Compilers by dbaupp on Monday September 10, 2018 @09:00AM (#17951464)
Correct me if I'm wrong, but that architectually seems to be a conventional (profile-guided/feedback-driven) optimizing compiler, except the input "language" is machine code.

For instance, it's peephole optimizations are also a chunk of hand-written C++ code (https://github.com/facebookincubator/BOLT/blob/2ed436a6d3b17...), and thus could benefit just as much from the more declarative (and possibly SMT-driven) ideas in this paper.

Finally, there's all sorts of optimizations that are only possible because of high-level information from the source language. For instance, removing unnecessary loads & stores requires knowing pointers don't alias, which is very difficult to deduce given unannotated integers (most of this is driven by language rules, such as the (controversial) TBAA in C). Additionally, even the BOLT paper itself mentions things that can be understood (and optimized for) from a higher-level language, but are much harder to deduce from a raw binary (Section 8):

> Indirect tail calls are more challenging for static binary rewriters because it is difficult to guess if the target is another function or another basic block of the same function, which could affect the CFG

And, the paper touches on your curiosity in the conclusion:

> Nevertheless, a post-link optimizer has fewer optimizations than a compiler. We show that the strengths of both strategies combine instead of purely overlapping

(Oh, one more post-finally thing, there's probably an argument to be had that BOLT fits into the (backend) superoptimizer category of the paper.)

Re:Future Directions for Optimizing Compilers by delinka on Monday September 10, 2018 @05:59PM (#17955578)
BOLT’s input is machine code and a profile from running the executable in production. This definitely puts it outside the conventional optimizing compiler because the conventional compiler has no information about how the code will actually be executed.
Re:Future Directions for Optimizing Compilers by dbaupp on Monday September 10, 2018 @06:24PM (#17955699)
That is how profile-guided optimisation (PGO) aka feedback-directed optimisation (FDO) works.