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

Address-expose locals under complex local addresses in block morphing #63100

Commits on Jan 13, 2022

  1. Handle complex local addresses in block morphing

    In block morphing, "addrSpill" is used when the destination or source
    represent indirections of "complex" addresses. Unfortunately, some trees
    in the form of "IND(ADDR(LCL))" fall into this category.
    
    If such an "ADDR(LCL)" is used as an "addrSpill", the underlying local
    *must* be marked as address-exposed. Block morphing was using a very
    simplistic test for when that needs to happen, essentially only recognizing
    "ADDR(LCL_VAR/FLD)". But it is possible to have a more complicated pattern
    as "PrepareDst/Src" uses "IsLocalAddrExpr" to recognize indirect stores
    to locals.
    
    Currently it appears impossible to get a mismatch here as morph transforms
    "IND(ADD(ADDR(LCL_VAR), OFFSET))" into "LCL_FLD" (including for TYP_STRUCT
    indirections), but this is a very fragile invariant. Transforming TYP_STRUCT
    GT_FIELDs into GT_OBJs instead of GT_INDs breaks it, for example.
    
    Fix this by address-exposing the local obtained via "IsLocalAddrExpr".
    SingleAccretion committed Jan 13, 2022
    Configuration menu
    Copy the full SHA
    51fd539 View commit details
    Browse the repository at this point in the history

Commits on Jan 18, 2022

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