You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Facebook has written a post-link optimizer called BOLT. Its purpose is to analyze static binaries and reorder code segments in order to optimize icache utilization.
The question is whether or not we can apply this tool to rustc. I'm not sure if the compiler binaries we distribute are built with LTO or any form of PGO (how well do we even support that?), and if they aren't then we might hope see a disproportionate benefit from doing so.
According to a developer, there is reason to suspect that it may not take much (any?) work to get it to operate on Rust code: facebookarchive/BOLT#41 (comment) , as long as the code does not "rely on code layout properties, such as function pointer deltas" (I don't know if rustc generates any code that would violate that), and as long as binaries are linked with --emit-relocs.
The text was updated successfully, but these errors were encountered:
Facebook has written a post-link optimizer called BOLT. Its purpose is to analyze static binaries and reorder code segments in order to optimize icache utilization.
They have an experience report on using this tool to optimize binaries of the Clang compiler. For a benchmark of building Clang, BOLT'd Clang binaries were 25% faster, or 12% faster when the Clang binary had first been compiled with LTO and PGO.
They have a paper with more details here: https://arxiv.org/pdf/1807.06735.pdf
The question is whether or not we can apply this tool to rustc. I'm not sure if the compiler binaries we distribute are built with LTO or any form of PGO (how well do we even support that?), and if they aren't then we might hope see a disproportionate benefit from doing so.
According to a developer, there is reason to suspect that it may not take much (any?) work to get it to operate on Rust code: facebookarchive/BOLT#41 (comment) , as long as the code does not "rely on code layout properties, such as function pointer deltas" (I don't know if rustc generates any code that would violate that), and as long as binaries are linked with
--emit-relocs
.The text was updated successfully, but these errors were encountered: