JuliaLang / PackageCompiler.jl

Compile your Julia Package
https://julialang.github.io/PackageCompiler.jl/dev/
MIT License
1.39k stars 185 forks source link

Plans for the "true" Profile-Guided Optimization (PGO) in the compiler #940

Open zamazan4ik opened 2 months ago

zamazan4ik commented 2 months ago

Hi!

According to the documentation, in the compiler already exists some kind of "Profile-Guided Compilation". However, as far as I understand, it doesn't implement profile-guided optimizations like inlining, hot/cold code splitting, etc. as it's done in other AoT compilers with PGO like Clang, GCC, MSVC, Rustc, etc.

Do you have plans to implement it in the future? Implementing such a feature can help to achieve better performance in AoT mode. I tested PGO for many applications and it shows a great performance boost in practice - all the results are available at https://github.com/zamazan4ik/awesome-pgo . However, I understand implementing such optimizations can be a difficult task to complete, especially if you don't reuse existing LLVM/GCC infrastructure for that.

Thank you.