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

[ownership] Define a new instruction copy_unmanaged_value. #26839

Merged

Commits on Aug 26, 2019

  1. [ownership] Define a new instruction copy_unmanaged_value.

    This provides a singular instruction for convert an unmanaged value to a ref,
    then strong_retain it. I expanded the definition of UNCHECKED_REF_STORAGE to
    include these copy like instructions. This instruction is valid in all SIL.
    
    The reason why I am adding this instruction is that currently when we emit an
    access to an unowned (unsafe) ivar, we use an unmanaged_to_ref and a strong
    retain. This can look to the optimizer like a strong retain that can potentially
    be optimized. By combining the two together into a new instruction, we can avoid
    this potential problem since the pattern matching will break.
    gottesmm committed Aug 26, 2019
    Configuration menu
    Copy the full SHA
    5fc1d1d View commit details
    Browse the repository at this point in the history