-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
offload: move (un)register lib into global_ctors #150893
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
base: main
Are you sure you want to change the base?
Conversation
|
|
This comment has been minimized.
This comment has been minimized.
788ce48 to
542e8e2
Compare
This comment has been minimized.
This comment has been minimized.
c5134ae to
79a9d30
Compare
|
@kevinsala #150683 fails with the commit where I drop
|
c0920cd to
6073368
Compare
|
I dropped the last commit, since we'll still need |
|
Since oli is currently busy, |
|
@rustbot reroll |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
a079a23 to
31860e3
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
31860e3 to
7069772
Compare
Right now we initialize the openmp/offload runtime before every single offload call, and tear it down directly afterwards.
What we should rather do is initialize it once in the binary startup code, and tear it down at the end of the binary execution. Here I implement these changes.
Together, our generated IR has a lot less usage of globals, which in turn simplifies the refactoring in #150683, where I introduce a new variant of our offload intrinsic.
r? oli-obk