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: Change GTF_ICON_INITCLASS -> GTF_IND_INITCLASS #85396

Merged
merged 5 commits into from
Apr 26, 2023

Commits on Apr 26, 2023

  1. Configuration menu
    Copy the full SHA
    3699de5 View commit details
    Browse the repository at this point in the history
  2. Revert "Introduce new handle kinds"

    This reverts commit 3699de5.
    jakobbotsch committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    ee80bdb View commit details
    Browse the repository at this point in the history
  3. Teach constant propagation to propagate GTF_ICON_INITCLASS

    This flag represents that dereferences off of the handle are dependent
    on a cctor and cannot be hoisted out unless all cctors also are. It must
    be propagated together with the constant for correctness.
    jakobbotsch committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    c6a1fca View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e16e626 View commit details
    Browse the repository at this point in the history
  5. 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
    6566ee1 View commit details
    Browse the repository at this point in the history