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

[BOLT][NFC] Run ADRRelaxationPass in parallel #67831

Merged
merged 1 commit into from
Sep 30, 2023

Conversation

yota9
Copy link
Member

@yota9 yota9 commented Sep 29, 2023

To do this:

  1. Protect BC.Ctx with mutex
  2. Don't call exit from thread, please check the reason comment near
    PassFailed variable definition. The other option would be call _Exit
    instead of exit, but I think we shall call destructors properly.

To do this:
1. Protect BC.Ctx with mutex
2. Don't call exit from thread, please check the reason comment near
PassFailed variable definition. The other option would be call _Exit
instead of exit, but I think we shall call destructors properly.
Copy link
Contributor

@rafaelauler rafaelauler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG, any wins in processing time from this change?

In general, we don't want to be unnecessarily running things in parallel because they significantly complicate debugging. But if we have good wins, go ahead and commit it. Also consider using a std::atomic_bool to flag it as a value that is accessed by multiple threads.

@yota9
Copy link
Member Author

yota9 commented Sep 30, 2023

@rafaelauler To be honest I don't have big-enough binary right now to check. On a simple binary I see reduction from 3.3% user time to 0. Anyway we have most of the passes run in parallel, I don't think it is a big deal to run this one too.. As for atomic I just don't see reason to use it here, since we only set variable to true and we don't really care about racing conditions in such situation... Thanks for your reviews!

@yota9 yota9 merged commit f99bd29 into llvm:main Sep 30, 2023
3 checks passed
Guzhu-AMD pushed a commit to GPUOpen-Drivers/llvm-project that referenced this pull request Oct 12, 2023
Local branch amd-gfx ac6784f Merged main:fef1bec39642 into amd-gfx:b13841aa3970
Remote branch main f99bd29 [BOLT][NFC] Run ADRRelaxationPass in parallel (llvm#67831)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants