[webkit-changes] [WebKit/WebKit] 3d3c9d: [WGSL] Only rewrite globals in callees once

Tadeu Zagallo noreply at github.com
Wed Jun 7 01:27:21 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3d3c9d7305a521d954325bac38b15dd7f4c2fc6d
      https://github.com/WebKit/WebKit/commit/3d3c9d7305a521d954325bac38b15dd7f4c2fc6d
  Author: Tadeu Zagallo <tzagallo at apple.com>
  Date:   2023-06-07 (Wed, 07 Jun 2023)

  Changed paths:
    M Source/WebGPU/WGSL/GlobalVariableRewriter.cpp
    M Source/WebGPU/WGSL/tests/valid/global-used-by-callee.wgsl

  Log Message:
  -----------
  [WGSL] Only rewrite globals in callees once
https://bugs.webkit.org/show_bug.cgi?id=257716
rdar://110265430

Reviewed by Dan Glastonbury.

A callee might be reached through multiple paths in the call graph (e.g. f->h and
f->g->h), so we need to keep track of the callees we already visited. However, when
we encounter a callee we already visited we (might) still need to rewrite all the
call sites to that callee if its signature was modified (i.e. if it needs global
variable(s) to be passed to it).

* Source/WebGPU/WGSL/GlobalVariableRewriter.cpp:
(WGSL::RewriteGlobalVariables::visitCallee):
* Source/WebGPU/WGSL/tests/valid/global-used-by-callee.wgsl:

Canonical link: https://commits.webkit.org/264931@main




More information about the webkit-changes mailing list