[webkit-changes] [WebKit/WebKit] d3bb3e: [WGSL] Add a CallGraph

Tadeu Zagallo noreply at github.com
Mon Jan 23 12:36:23 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d3bb3ea55bb7bc28aa962d2b435940f2a877847e
      https://github.com/WebKit/WebKit/commit/d3bb3ea55bb7bc28aa962d2b435940f2a877847e
  Author: Tadeu Zagallo <tzagallo at apple.com>
  Date:   2023-01-23 (Mon, 23 Jan 2023)

  Changed paths:
    A Source/WebGPU/WGSL/CallGraph.cpp
    A Source/WebGPU/WGSL/CallGraph.h
    M Source/WebGPU/WGSL/EntryPointRewriter.cpp
    M Source/WebGPU/WGSL/EntryPointRewriter.h
    M Source/WebGPU/WGSL/WGSL.cpp
    M Source/WebGPU/WebGPU.xcodeproj/project.pbxproj

  Log Message:
  -----------
  [WGSL] Add a CallGraph
https://bugs.webkit.org/show_bug.cgi?id=251005
<rdar://problem/104552119>

Reviewed by Dean Jackson.

Introduce a CallGraph data structure and a CallGraphBuilder pass. For
now it's still fairly limited, as we still don't support function calls,
but it helps the current passes that have to visit entry points.

* Source/WebGPU/WGSL/CallGraph.cpp: Added.
(WGSL::CallGraph::CallGraph):
(WGSL::CallGraphBuilder::CallGraphBuilder):
(WGSL::CallGraphBuilder::build):
(WGSL::CallGraphBuilder::initializeMappings):
(WGSL::CallGraphBuilder::visit):
(WGSL::buildCallGraph):
* Source/WebGPU/WGSL/CallGraph.h: Copied from Source/WebGPU/WGSL/EntryPointRewriter.h.
(WGSL::CallGraph::ast):
(WGSL::CallGraph::entrypoints):
* Source/WebGPU/WGSL/EntryPointRewriter.cpp:
(WGSL::rewriteEntryPoints):
(WGSL::RewriteEntryPoints::RewriteEntryPoints): Deleted.
(WGSL::RewriteEntryPoints::visit): Deleted.
* Source/WebGPU/WGSL/EntryPointRewriter.h:
* Source/WebGPU/WGSL/WGSL.cpp:
(WGSL::prepare):
* Source/WebGPU/WebGPU.xcodeproj/project.pbxproj:

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




More information about the webkit-changes mailing list