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

Fix value numbering of field assignments #61113

Commits on Nov 6, 2021

  1. Fix value numbering of field assignments

    When value numbering an assignment to a field, VNApplySelectorsAssign
    was called twice, first for the field sequence to find the exact
    value, then for the heap VN update. This is not correct as the method
    expects to be called only for sequences that will end up updating a
    map with exact values, as it type checks the store with the helper
    VNApplySelectorsAssignTypeCoerce. Usage of VNApplySelectorsAssign
    to update the heap ended up meaning that any stores to struct fields
    ended up with casts for maps, blocking traversal in VNForMapSelect.
    
    A handful of positive diffs for this commit resulting from more CSEs
    and redundant branch optimizations, due to more precise liberal VNs.
    SingleAccretion committed Nov 6, 2021
    Configuration menu
    Copy the full SHA
    a6c7492 View commit details
    Browse the repository at this point in the history
  2. Add an optimization

    It was confusing in the dumps to look at unused results of VNForMapSelect,
    so just avoid looking for the first field's value if we do not need it.
    SingleAccretion committed Nov 6, 2021
    Configuration menu
    Copy the full SHA
    0a4c6ae View commit details
    Browse the repository at this point in the history
  3. Fix formatting

    SingleAccretion committed Nov 6, 2021
    Configuration menu
    Copy the full SHA
    3744a29 View commit details
    Browse the repository at this point in the history
  4. Go back to typing the "first field map" as a field

    This is a temporary change to minimize diffs.
    The issue is that we need to update both the
    reading and writing code at once if we want
    to change the types of the maps without some
    regressions due to new artificial mismatches.
    SingleAccretion committed Nov 6, 2021
    Configuration menu
    Copy the full SHA
    352acf4 View commit details
    Browse the repository at this point in the history