[webkit-changes] [WebKit/WebKit] f91396: [WGSL] Generate code based on the call graph inste...
Tadeu Zagallo
noreply at github.com
Wed Mar 15 07:32:45 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f91396565739ef8714432b1c8aa42f4e95e5d166
https://github.com/WebKit/WebKit/commit/f91396565739ef8714432b1c8aa42f4e95e5d166
Author: Tadeu Zagallo <tzagallo at apple.com>
Date: 2023-03-15 (Wed, 15 Mar 2023)
Changed paths:
M Source/WebGPU/WGSL/Metal/MetalCodeGenerator.cpp
M Source/WebGPU/WGSL/Metal/MetalCodeGenerator.h
M Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp
M Source/WebGPU/WGSL/Metal/MetalFunctionWriter.h
M Source/WebGPU/WGSL/WGSL.cpp
Log Message:
-----------
[WGSL] Generate code based on the call graph instead of full AST
https://bugs.webkit.org/show_bug.cgi?id=253664
rdar://106512158
Reviewed by Myles C. Maxfield.
Currently we generate code for the full AST, including code that might be unreachable
from the entrypoints being compiled. Use the CallGraph instead so we don't generate
unnecessary code.
* Source/WebGPU/WGSL/Metal/MetalCodeGenerator.cpp:
(WGSL::Metal::generateMetalCode):
* Source/WebGPU/WGSL/Metal/MetalCodeGenerator.h:
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.cpp:
(WGSL::Metal::FunctionDefinitionWriter::FunctionDefinitionWriter):
(WGSL::Metal::FunctionDefinitionWriter::write):
(WGSL::Metal::FunctionDefinitionWriter::visit):
(WGSL::Metal::emitMetalFunctions):
* Source/WebGPU/WGSL/Metal/MetalFunctionWriter.h:
* Source/WebGPU/WGSL/WGSL.cpp:
(WGSL::prepareImpl):
Canonical link: https://commits.webkit.org/261686@main
More information about the webkit-changes
mailing list