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

JIT: Generalize assignment decomposition in physical promotion #85323

Merged
merged 43 commits into from
May 6, 2023

Commits on Apr 25, 2023

  1. JIT: Generalize assignment decomposition in physical promotion

    Generalize assignment decomposition to handle arbitrary combinations of
    physically promoted structs. Do this by introducing a DecompositionPlan
    class that keeps track of the copies to do that involve replacement
    fields. The first step is then to fill out this plan. In the general
    case where both the source and destination are physically promoted this
    involves iterating the replacements in lockstep. For promotions that map
    exactly, a direct copy between their locals is queued into the plan; in
    other cases (e.g. partial overlap) it may involve writing the source
    back to the struct local.
    
    The plan is used to generate the IR and to figure out whether the writes
    of all the replacement fields covers the destination such that the
    original struct copy can be omitted.
    
    Also unnest StatementList and rename it to DecompositionStatementList as
    the other name conflicted with another class.
    jakobbotsch committed Apr 25, 2023
    Configuration menu
    Copy the full SHA
    52c1022 View commit details
    Browse the repository at this point in the history
  2. Handle no promoted field

    jakobbotsch committed Apr 25, 2023
    Configuration menu
    Copy the full SHA
    09db21e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    813fa83 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5a372af View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5e54863 View commit details
    Browse the repository at this point in the history
  6. Remove leftover code

    jakobbotsch committed Apr 25, 2023
    Configuration menu
    Copy the full SHA
    22aa3f7 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    87e55d6 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    70defdc View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2023

  1. JIT: Change GTF_ICON_INITCLASS -> GTF_IND_INITCLASS

    The JIT has a flag GTF_ICON_INITCLASS that represents that accesses off
    that address are cctor dependent. Hoisting uses this to avoid hoisting
    cctor dependent indirections unless all cctors are also hoisted.
    However, local constant prop/VN-based constant prop do not handle this
    flag, so we could run into cases where addresses with GTF_ICON_INITCLASS
    were propagated and then subsequently hoisted incorrectly.
    
    This change moves the flag to an OperIsIndir() flag instead of being a
    flag on the constant. After some digging, I found that the original
    reason the flag was not an indir flag was simply that there were no more
    indir flags available, but we do have available flags today. This fix
    is much simpler than the alternatives which would be to teach VN/local
    copy prop to propagate this GTF_ICON_INITCLASS flag.
    
    Also remove GTF_FLD_INITCLASS which is never set.
    jakobbotsch committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    fc2e53a View commit details
    Browse the repository at this point in the history
  2. Propagate indir flags

    jakobbotsch committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    2b7440a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    05c848c View commit details
    Browse the repository at this point in the history
  4. Rename scenarios

    jakobbotsch committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    58c9d82 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5981e5e View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2023

  1. Configuration menu
    Copy the full SHA
    043df46 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9aed5e5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    33b899b View commit details
    Browse the repository at this point in the history
  4. Handle remainders

    jakobbotsch committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    3b0d92e View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2023

  1. Configuration menu
    Copy the full SHA
    63ec4fb View commit details
    Browse the repository at this point in the history
  2. Run jit-format

    jakobbotsch committed Apr 28, 2023
    Configuration menu
    Copy the full SHA
    6c12a74 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fb9af8d View commit details
    Browse the repository at this point in the history
  4. Fix

    jakobbotsch committed Apr 28, 2023
    Configuration menu
    Copy the full SHA
    1eef1d9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9578acd View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    be5b809 View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2023

  1. Switch to decimal offsets

    jakobbotsch committed Apr 29, 2023
    Configuration menu
    Copy the full SHA
    d84ecf0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d882e09 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2023

  1. Configuration menu
    Copy the full SHA
    4186c51 View commit details
    Browse the repository at this point in the history
  2. Enhance some logging

    jakobbotsch committed May 2, 2023
    Configuration menu
    Copy the full SHA
    6d46dd2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d252517 View commit details
    Browse the repository at this point in the history
  4. Hack for regex case

    jakobbotsch committed May 2, 2023
    Configuration menu
    Copy the full SHA
    2afbf82 View commit details
    Browse the repository at this point in the history
  5. Revert "Hack for regex case"

    This reverts commit 2afbf82.
    jakobbotsch committed May 2, 2023
    Configuration menu
    Copy the full SHA
    846ce0d View commit details
    Browse the repository at this point in the history
  6. Revert "Allow DCE of partial defs"

    This reverts commit d252517.
    jakobbotsch committed May 2, 2023
    Configuration menu
    Copy the full SHA
    0a9481e View commit details
    Browse the repository at this point in the history

Commits on May 3, 2023

  1. Configuration menu
    Copy the full SHA
    5ad9291 View commit details
    Browse the repository at this point in the history
  2. What if I remove this

    jakobbotsch committed May 3, 2023
    Configuration menu
    Copy the full SHA
    c7254bf View commit details
    Browse the repository at this point in the history
  3. Extract to a new file

    jakobbotsch committed May 3, 2023
    Configuration menu
    Copy the full SHA
    6f782dd View commit details
    Browse the repository at this point in the history
  4. A few fixes

    jakobbotsch committed May 3, 2023
    Configuration menu
    Copy the full SHA
    0888806 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9641dbe View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7d96e83 View commit details
    Browse the repository at this point in the history
  7. Fix after merge

    jakobbotsch committed May 3, 2023
    Configuration menu
    Copy the full SHA
    bd2021d View commit details
    Browse the repository at this point in the history

Commits on May 4, 2023

  1. Configuration menu
    Copy the full SHA
    5929d19 View commit details
    Browse the repository at this point in the history
  2. Fix after merge

    jakobbotsch committed May 4, 2023
    Configuration menu
    Copy the full SHA
    39428e4 View commit details
    Browse the repository at this point in the history
  3. Clean up a bit

    jakobbotsch committed May 4, 2023
    Configuration menu
    Copy the full SHA
    c7a9f8d View commit details
    Browse the repository at this point in the history

Commits on May 5, 2023

  1. Configuration menu
    Copy the full SHA
    b346598 View commit details
    Browse the repository at this point in the history
  2. Fix bad factoring

    jakobbotsch committed May 5, 2023
    Configuration menu
    Copy the full SHA
    d431901 View commit details
    Browse the repository at this point in the history