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

Proper VNs for zeroed structs #61285

Merged

Commits on Nov 7, 2021

  1. Number zero-initialized struct properly

    Previously, zero-initialized struct locals were given
    a special $VNForZeroMap, which had the nice property
    that VNForMapSelect($VNForZeroMap, Field) would always
    return zero of the appropriate type. However, the fact
    that this VN is not unique meant that it was dangerous
    to propagate it, e. g. through copies, which was hidden
    by the fact that ApplySelectorsTypeCheck's logic is very
    conservative.
    
    This change introduces a new VNFunc to represent zeroed
    objects - VNF_ZeroObj, that takes a struct handle as its
    argument and is thus free of the aforementioned problem and
    can be propagated freely and not treated specially. It
    also, of course, retains the ZeroMap's selection property.
    
    There are almost no diffs for this change because of some
    other deficiencies in assertion and copy propagation, they
    are being/will be fixed separately.
    SingleAccretion committed Nov 7, 2021
    Configuration menu
    Copy the full SHA
    132f31f View commit details
    Browse the repository at this point in the history
  2. Fix VNZeroForType's handling of SIMD types

    Previously this codepath was reachable, but did not matter as
    the returned values were immediately discarded because of the
    conservative logic in VNApplySelectorsTypeCheck. This is still
    more or less the case, but let's just fix it properly.
    SingleAccretion committed Nov 7, 2021
    Configuration menu
    Copy the full SHA
    c884372 View commit details
    Browse the repository at this point in the history