facebookarchive / BOLT

Binary Optimization and Layout Tool - A linux command-line utility used for optimizing performance of binaries
2.51k stars 177 forks source link

How will bolt integrate with llvm in the future? #287

Closed dangit815 closed 2 years ago

dangit815 commented 2 years ago

At present, bolt source code has been integrated into llvm. Will bolt processing flow be further combined with llvm in the future? For example, bolt uses llvm IR and llvm optimization pass to improve the effect of post-link optimizing?

Because in the binary phase, bolt can see more optimization opportunities, but currently bolt only supports BB block rearrangement, function rearrangement and other optimization, and its ability is weak. If the optimization ability of llvm can be used, it is expected to obtain greater optimization effect.

dangit815 commented 2 years ago

cc @rafaelauler @maksfb @aaupov

rafaelauler commented 2 years ago

I think I answered that in https://discourse.llvm.org/t/want-to-know-about-bolt-and-llvm-post-planning/61674 but let me know if there are any remaining questions.

dangit815 commented 2 years ago

Thank you. In addition, where can I see the follow-up plan of bolt?

maksfb commented 2 years ago

I've added a list of BOLT Open Projects at: https://discourse.llvm.org/t/bolt-open-projects/61857

dangit815 commented 2 years ago

I see that "Raising IR" is mentioned here. What is the attitude of bolt community towards this direction? @maksfb @rafaelauler seem to have conflicting views on this direction. image

rafaelauler commented 2 years ago

I'm not opposed to the idea, but it is a non-trivial project.