RESOLVED FIXED 199688
[WHLSL] The recursion checker should not have quadratic complexity
https://bugs.webkit.org/show_bug.cgi?id=199688
Summary [WHLSL] The recursion checker should not have quadratic complexity
Robin Morisset
Reported 2019-07-10 15:58:38 PDT
...
Attachments
Patch (3.12 KB, patch)
2019-07-10 17:06 PDT, Robin Morisset
no flags
Patch (3.16 KB, patch)
2019-07-10 17:31 PDT, Robin Morisset
no flags
Patch (3.16 KB, patch)
2019-07-10 17:33 PDT, Robin Morisset
no flags
Robin Morisset
Comment 1 2019-07-10 17:06:15 PDT
Saam Barati
Comment 2 2019-07-10 17:10:20 PDT
Comment on attachment 373878 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=373878&action=review > Source/WebCore/Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp:47 > + void visit(Program& program) override > + { > + for (auto& functionDefinition : program.functionDefinitions()) > + checkErrorAndVisit(functionDefinition); > + } Nice. We should probably do this in more phases. > Source/WebCore/Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp:62 > + auto addResult2 = m_finishedVisiting.add(&functionDefinition); > + ASSERT_UNUSED(addResult2, addResult2); this probably doesn't compile on debug builds. You want addResult2.isNewEntry. Also, can you just give it its own scope instead of calling it addResult2? Or perhaps limit scope to above addResult?
Robin Morisset
Comment 3 2019-07-10 17:31:17 PDT
Robin Morisset
Comment 4 2019-07-10 17:33:24 PDT
WebKit Commit Bot
Comment 5 2019-07-10 18:18:21 PDT
Comment on attachment 373881 [details] Patch Clearing flags on attachment: 373881 Committed r247339: <https://trac.webkit.org/changeset/247339>
WebKit Commit Bot
Comment 6 2019-07-10 18:18:22 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7 2019-07-10 18:19:25 PDT
Note You need to log in before you can comment on or make changes to this bug.