Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Profile-Guided Optimizations (PGO) #650

Open
zamazan4ik opened this issue Nov 15, 2023 · 0 comments
Open

Add support for Profile-Guided Optimizations (PGO) #650

zamazan4ik opened this issue Nov 15, 2023 · 0 comments
Labels
compiler Changes related to the compiler feature New things to add to Inko, such as a new standard library module performance Changes related to improving performance

Comments

@zamazan4ik
Copy link

zamazan4ik commented Nov 15, 2023

Description

Profile-Guided Optimization (PGO) is a compiler optimization technique that uses runtime profile information for more aggressive optimizations during the compile time. PGO is not a novel optimization technique - it's already supported by many compilers like Rustc, GCC, Clang, MSVC, Go, etc.

We need to add PGO support to the Inko compiler, so users will be able to compile their programs in Inko lang with this optimization. LLVM already supports many PGO kinds - information about them can be found at https://aaupov.github.io/blog/2023/07/09/pgo . I think the PGO integration into the Inko compiler could done in the same way as it's done for Rustc/Clang (since they are both LLVM-based) - with introducing additional compiler optimization options like -fprofile-instr-generate/-fprofile-instr-use (in the case of Instrumentation PGO).

In my opinion, the most useful PGO ways in practice are Instrumentation PGO and Sampling PGO (also sometimes called as AutoFDO).

Related work

Many materials about PGO effects on the performance software, support across the ecosystem, etc. can be found in the https://github.com/zamazan4ik/awesome-pgo repo.

@zamazan4ik zamazan4ik added the feature New things to add to Inko, such as a new standard library module label Nov 15, 2023
@yorickpeterse yorickpeterse added performance Changes related to improving performance compiler Changes related to the compiler labels Nov 15, 2023
@yorickpeterse yorickpeterse added this to the Future ideas milestone Dec 24, 2023
@yorickpeterse yorickpeterse removed this from the Future ideas milestone Aug 5, 2024
@yorickpeterse yorickpeterse changed the title Add Profile-Guided Optimization (PGO) support to the Inko compiler Add support for Profile-Guided Optimization (PGO) Aug 16, 2024
@yorickpeterse yorickpeterse changed the title Add support for Profile-Guided Optimization (PGO) Add support for Profile-Guided Optimizations (PGO) Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler Changes related to the compiler feature New things to add to Inko, such as a new standard library module performance Changes related to improving performance
Projects
None yet
Development

No branches or pull requests

2 participants