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

FrontEnd PGO (FE PGO) vs IR PGO #4542

Open
zamazan4ik opened this issue Dec 10, 2023 · 2 comments
Open

FrontEnd PGO (FE PGO) vs IR PGO #4542

zamazan4ik opened this issue Dec 10, 2023 · 2 comments

Comments

@zamazan4ik
Copy link

According to the LDC documentation, LDC now implements FrontEnd PGO (FE PGO) (since -fprofile-instr-generate option in Clang enables FE PGO too).

According to the issue in the LLVM tracker, FE PGO is not a recommended way to implement PGO nowadays. IR PGO (-fprofile-generate option in Clang) should be used instead.

I think we need to consider giving the possibility to users use IR PGO with LDC as well and write this recommendation in LDC's PGO documentation.

@kinke
Copy link
Member

kinke commented Dec 10, 2023

We do have IR-based PGO since a very long time; like clang, we use -fprofile-{use,generate} for that. It's also the PGO method we use for the compiler itself.

@zamazan4ik
Copy link
Author

Great! That means the only needed change here is updating this PGO guide: https://wiki.dlang.org/LDC_LLVM_profiling_instrumentation :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants