Bug 178986 - [WSL] Allow functions to have multiple pointer returns
Summary: [WSL] Allow functions to have multiple pointer returns
Status: RESOLVED MOVED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGPU (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Myles C. Maxfield
URL:
Keywords:
Depends on:
Blocks: 176199
  Show dependency treegraph
 
Reported: 2017-10-28 17:57 PDT by Myles C. Maxfield
Modified: 2018-10-13 15:56 PDT (History)
0 users

See Also:


Attachments
WIP (6.79 KB, patch)
2017-10-28 17:58 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (10.28 KB, patch)
2017-10-29 17:11 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (10.72 KB, patch)
2017-10-29 21:56 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff
Patch (19.50 KB, patch)
2017-10-30 00:09 PDT, Myles C. Maxfield
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Myles C. Maxfield 2017-10-28 17:57:26 PDT
This is needed for anders.
Comment 1 Myles C. Maxfield 2017-10-28 17:58:24 PDT
Created attachment 325270 [details]
WIP
Comment 2 Myles C. Maxfield 2017-10-29 17:11:45 PDT
Created attachment 325305 [details]
Patch
Comment 3 Myles C. Maxfield 2017-10-29 17:13:01 PDT
Comment on attachment 325305 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=325305&action=review

> Tools/WebGPUShadingLanguageRI/LogicalMode.js:117
> +            [Node.visit(node.value, this), Node.visit(node.argumentList[1], this)]);

s/node.argumentList[1]/this._subscript.argumentList[1]/
Comment 4 Myles C. Maxfield 2017-10-29 21:56:06 PDT
Created attachment 325322 [details]
Patch
Comment 5 Myles C. Maxfield 2017-10-30 00:09:17 PDT
Created attachment 325331 [details]
Patch
Comment 6 Myles C. Maxfield 2018-08-29 17:14:00 PDT
This is going to be tricky.

On one hand, anders are not useful if they can't have multiple pointer returns.

On the other hand, multiple pointer returns naively require phi operations over pointers.

So we'll have to inline the ander and see if we can remove the pointer. But, for user-created types, any arbitrary stuff can be in the ander. So, we have to specify exactly what types of transformations the compiler will perform to try to remove these pointers.
Comment 7 Myles C. Maxfield 2018-09-06 15:12:55 PDT
Seems that a policy of "anders are mostly useless, please use getters and setters instead" along with compiler optimizations is sufficient for now.
Comment 8 Myles C. Maxfield 2018-10-13 15:56:55 PDT
Migrated to https://github.com/gpuweb/WHLSL/issues/121