-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Import KEEPALIVE(BOX)
as KEEPALIVE(ADDR(TEMP))
#54412
Merged
Merged
Commits on Jul 26, 2021
-
Prototype removing boxes from GC.KeepAlive
Instead, import KEEPALIVE(BOX) as a sequence of KEEPALIVE for object fields (flattened).
Configuration menu - View commit details
-
Copy full SHA for b416a3f - Browse repository at this point
Copy the full SHA b416a3fView commit details -
Move the importation to its own method. Add debug output. Rename a few things.
Configuration menu - View commit details
-
Copy full SHA for 0ed6cc6 - Browse repository at this point
Copy the full SHA 0ed6cc6View commit details -
Configuration menu - View commit details
-
Copy full SHA for a8bfba4 - Browse repository at this point
Copy the full SHA a8bfba4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7fd3959 - Browse repository at this point
Copy the full SHA 7fd3959View commit details -
Configuration menu - View commit details
-
Copy full SHA for 432a194 - Browse repository at this point
Copy the full SHA 432a194View commit details -
Configuration menu - View commit details
-
Copy full SHA for 116dca1 - Browse repository at this point
Copy the full SHA 116dca1View commit details -
Running diffs for win-x64, there was exactly one result, in this test. GC.KeepAlive here is used as a generic "make sure that there is a use for the variable beyond an assigment" function. The new optimization eliminates this use as the struct in question has no GC fields. Fix the test by using an actual generic "use me" function. Will be broken by advanced interprocediral analysis that is apparently not as far away as one would expect, but will do for now.
Configuration menu - View commit details
-
Copy full SHA for b6929d5 - Browse repository at this point
Copy the full SHA b6929d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for d67cc7c - Browse repository at this point
Copy the full SHA d67cc7cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 26cee1a - Browse repository at this point
Copy the full SHA 26cee1aView commit details -
It is possible for a GC to occur just after the KeepAlive calls and for CheckSuccess to wrongly conclude the objects weren't kept alive.
Configuration menu - View commit details
-
Copy full SHA for c51b07e - Browse repository at this point
Copy the full SHA c51b07eView commit details
Commits on Jul 30, 2021
-
Only elide copies for GT_LCL_VARs
If the source is a GT_LCL_FLD, then we would only want too keep alive the fields it encloses (or, since TYP_STRUCT local fields are currently not supported, nothing).
Configuration menu - View commit details
-
Copy full SHA for f843ec9 - Browse repository at this point
Copy the full SHA f843ec9View commit details -
Use the address of the whole struct for KEEPALIVE
The field-by-field approach results in the struct getting address-exposed anyway, so there is no good reason to bloat the IR. Just have the address escape directly.
Configuration menu - View commit details
-
Copy full SHA for 9cfb36d - Browse repository at this point
Copy the full SHA 9cfb36dView commit details
Commits on Sep 2, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 2ca811c - Browse repository at this point
Copy the full SHA 2ca811cView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.