Skip to content

Conversation

gottesmm
Copy link
Contributor

This is technically a NFC commit. The changes are:

  1. When we scalarize loads/stores, we need to not just use unqualified
    loads/stores. Instead we need to use the createTrivial{Load,Store}Or APIs. In
    OSSA mode, this will propagate through the original ownership qualifier if the
    sub-type is non-trivial, but if the sub-type is non-trivial will change the
    qualifier to trivial. Today when the pass runs without ownership nothing is
    changed since I am passing in the "supports unqualified" flag to the
    createTrivial{Load,Store}Or API so that we just create an unqualified memop if
    we are passed in an unqualified memop. Once we fully move pmo to ownership, this
    flag will be removed and we will assert.

  2. The container walker is taught about copy_value, destroy_value. Specifically,
    we teach the walker how to recursively look through copy_values during the walk
    and to treat a destroy_value of the box like a strong_release,
    release_value. Since destroy_value, copy_value only exist in [ossa] today, this
    is also NFC.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

This is technically a NFC commit. The changes are:

1. When we scalarize loads/stores, we need to not just use unqualified
loads/stores. Instead we need to use the createTrivial{Load,Store}Or APIs. In
OSSA mode, this will propagate through the original ownership qualifier if the
sub-type is non-trivial, but if the sub-type is non-trivial will change the
qualifier to trivial. Today when the pass runs without ownership nothing is
changed since I am passing in the "supports unqualified" flag to the
createTrivial{Load,Store}Or API so that we just create an unqualified memop if
we are passed in an unqualified memop. Once we fully move pmo to ownership, this
flag will be removed and we will assert.

2. The container walker is taught about copy_value, destroy_value. Specifically,
we teach the walker how to recursively look through copy_values during the walk
and to treat a destroy_value of the box like a strong_release,
release_value. Since destroy_value, copy_value only exist in [ossa] today, this
is also NFC.
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

@gottesmm gottesmm merged commit 0c59faf into swiftlang:master Jan 15, 2019
@gottesmm gottesmm deleted the pr-c801ece850e47a555bf20268fadbf1a6e8ce59ad branch January 15, 2019 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant