Uploaded image for project: 'Swift'
  1. Swift
  2. SR-6889

[IRGen Opportunity] Use argmemonly for runtime functions

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Compiler
    • Labels:

      Description

      It should be possible to mark some of our runtime functions with argmemonly readonly as they receive their type arguments indirectly via an array of type arguments.

      I tried this in https://github.com/apple/swift/pull/14310 but tests failed. I did not have time to investigate why.

      I mentioned that if that following situation in some form or another this annotation is not legal:

      Type *args[5];
      pointer->field = // inlined initialization
      arg[1] = pointer
      argmemonly(args)
      

      However, we believe that this situation should? not arise. It might be worth investigating the failures.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            aschwaighofer@apple.com Arnold Schwaighofer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: