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 PGO support #304

Open
zamazan4ik opened this issue Jun 15, 2023 · 3 comments
Open

Add PGO support #304

zamazan4ik opened this issue Jun 15, 2023 · 3 comments

Comments

@zamazan4ik
Copy link

Since the upstream rustc supports PGO and clang gains benefits from PGO too I think would be a good idea to provide PGO build variant to mrustc as well.

@thepowersgang
Copy link
Owner

Would that mean mrustc itself built using PGO, or the rustc built by mrustc using PGO?

I've never worked with PGO, so cannot comment as to the ease of either - but speed isn't really the goal of mrustc, correctness is.

@zamazan4ik
Copy link
Author

Would that mean mrustc itself built using PGO, or the rustc built by mrustc using PGO?

Building mrustc with PGO.

but speed isn't really the goal of mrustc, correctness is.

PGO does not affect the correctness of a program - just a performance improvement.

I've never worked with PGO

I suggest starting with the documentation for your compiler. E.g. for Clang the documentation is here. More materials about PGO (results, more advanced techniques like LLVM BOLT, possibly helpful notes) are here. I hope it helps.

@thepowersgang
Copy link
Owner

I'll rephrase my previous comment - My personal focus is on getting mrustc to correctly produce code, not to focus on making it fast.

I wouldn't be too against someone else experimenting with PGO and seeing if it improves performance enough to be worth including.

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