RESOLVED FIXED 200518
[WHLSL] Prune unreachable stdlib functions after the Checker runs
https://bugs.webkit.org/show_bug.cgi?id=200518
Summary [WHLSL] Prune unreachable stdlib functions after the Checker runs
Saam Barati
Reported 2019-08-07 14:24:20 PDT
...
Attachments
patch (11.29 KB, patch)
2019-08-07 14:59 PDT, Saam Barati
no flags
patch (11.31 KB, patch)
2019-08-07 15:02 PDT, Saam Barati
rmorisset: review+
patch for landing (11.35 KB, patch)
2019-08-07 16:15 PDT, Saam Barati
no flags
Saam Barati
Comment 1 2019-08-07 14:59:17 PDT
EWS Watchlist
Comment 2 2019-08-07 15:01:06 PDT
Attachment 375757 [details] did not pass style-queue: ERROR: Source/WebCore/Modules/webgpu/WHLSL/WHLSLPrepare.cpp:43: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 1 in 6 files If any of these errors are false positives, please file a bug against check-webkit-style.
Saam Barati
Comment 3 2019-08-07 15:02:24 PDT
Robin Morisset
Comment 4 2019-08-07 15:12:50 PDT
Comment on attachment 375758 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=375758&action=review I think this patch also makes the ReachableFunctionGatherer that runs later obsolete since it will only ever receive reachable functions. > Source/WebCore/Modules/webgpu/WHLSL/WHLSLPruneUnreachableStandardLibraryFunctions.cpp:82 > + if (function->entryPointType() || function->parsingMode() != ParsingMode::StandardLibrary) I don't think you need the first part of this check: the entryPointType is certainly user-defined, no?
Saam Barati
Comment 5 2019-08-07 15:29:07 PDT
(In reply to Robin Morisset from comment #4) > Comment on attachment 375758 [details] > patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=375758&action=review > > I think this patch also makes the ReachableFunctionGatherer that runs later > obsolete since it will only ever receive reachable functions. > Not quite. That also prunes native functions. > > Source/WebCore/Modules/webgpu/WHLSL/WHLSLPruneUnreachableStandardLibraryFunctions.cpp:82 > > + if (function->entryPointType() || function->parsingMode() != ParsingMode::StandardLibrary) > > I don't think you need the first part of this check: the entryPointType is > certainly user-defined, no? Yes this is true. I just thought it's nice to call it out explicitly, but I can assert instead.
Saam Barati
Comment 6 2019-08-07 15:30:11 PDT
(In reply to Saam Barati from comment #5) > (In reply to Robin Morisset from comment #4) > > Comment on attachment 375758 [details] > > patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=375758&action=review > > > > I think this patch also makes the ReachableFunctionGatherer that runs later > > obsolete since it will only ever receive reachable functions. > > > Not quite. That also prunes native functions. More importantly, we can prune non stdlib functions later on. > > > > Source/WebCore/Modules/webgpu/WHLSL/WHLSLPruneUnreachableStandardLibraryFunctions.cpp:82 > > > + if (function->entryPointType() || function->parsingMode() != ParsingMode::StandardLibrary) > > > > I don't think you need the first part of this check: the entryPointType is > > certainly user-defined, no? > Yes this is true. I just thought it's nice to call it out explicitly, but I > can assert instead.
Robin Morisset
Comment 7 2019-08-07 15:30:36 PDT
Comment on attachment 375758 [details] patch r=me
Saam Barati
Comment 8 2019-08-07 16:15:14 PDT
Created attachment 375763 [details] patch for landing
WebKit Commit Bot
Comment 9 2019-08-07 23:23:04 PDT
Comment on attachment 375763 [details] patch for landing Clearing flags on attachment: 375763 Committed r248403: <https://trac.webkit.org/changeset/248403>
WebKit Commit Bot
Comment 10 2019-08-07 23:23:06 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 11 2019-08-07 23:24:15 PDT
Note You need to log in before you can comment on or make changes to this bug.