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

Import KEEPALIVE(BOX) as KEEPALIVE(ADDR(TEMP)) #54412

Merged
13 commits merged into from
Sep 3, 2021

Commits on Jul 26, 2021

  1. Prototype removing boxes from GC.KeepAlive

    Instead, import KEEPALIVE(BOX) as a sequence of
    KEEPALIVE for object fields (flattened).
    SingleAccretion committed Jul 26, 2021
    Configuration menu
    Copy the full SHA
    b416a3f View commit details
    Browse the repository at this point in the history
  2. Clean things up

    Move the importation to its own method.
    Add debug output.
    Rename a few things.
    SingleAccretion committed Jul 26, 2021
    Configuration menu
    Copy the full SHA
    0ed6cc6 View commit details
    Browse the repository at this point in the history
  3. Add a test

    Basic verification of the new optimization.
    SingleAccretion committed Jul 26, 2021
    Configuration menu
    Copy the full SHA
    a8bfba4 View commit details
    Browse the repository at this point in the history
  4. Fix formatting

    SingleAccretion committed Jul 26, 2021
    Configuration menu
    Copy the full SHA
    7fd3959 View commit details
    Browse the repository at this point in the history
  5. Disable the test on Mono

    It relies on a precise GC.
    SingleAccretion committed Jul 26, 2021
    Configuration menu
    Copy the full SHA
    432a194 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    116dca1 View commit details
    Browse the repository at this point in the history
  7. Fix a test

    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.
    SingleAccretion committed Jul 26, 2021
    Configuration menu
    Copy the full SHA
    b6929d5 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d67cc7c View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    26cee1a View commit details
    Browse the repository at this point in the history
  10. Fix the test

    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.
    SingleAccretion committed Jul 26, 2021
    Configuration menu
    Copy the full SHA
    c51b07e View commit details
    Browse the repository at this point in the history

Commits on Jul 30, 2021

  1. 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).
    SingleAccretion committed Jul 30, 2021
    Configuration menu
    Copy the full SHA
    f843ec9 View commit details
    Browse the repository at this point in the history
  2. 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.
    SingleAccretion committed Jul 30, 2021
    Configuration menu
    Copy the full SHA
    9cfb36d View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2021

  1. Configuration menu
    Copy the full SHA
    2ca811c View commit details
    Browse the repository at this point in the history