Changeset 248310 in webkit
- Timestamp:
- Aug 6, 2019, 1:31:04 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 deleted
- 5 edited
-
ChangeLog (modified) (1 diff)
-
Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp (modified) (1 diff)
-
Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.cpp (deleted)
-
Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.h (deleted)
-
Modules/webgpu/WHLSL/WHLSLPrepare.cpp (modified) (2 diffs)
-
Sources.txt (modified) (1 diff)
-
WebCore.xcodeproj/project.pbxproj (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r248307 r248310 1 2019-08-06 Saam Barati <sbarati@apple.com> 2 3 [WHLSL] Remove the auto initialize variables pass 4 https://bugs.webkit.org/show_bug.cgi?id=200472 5 6 Reviewed by Robin Morisset. 7 8 From a separation of concerns perspective, it's a bit nicer to make variables 9 without initializers call their default constructors as a transformation over the AST. 10 This removes the need for the lowering to need to worry about such things. However, 11 changing metal lowering to deal with this is trivial. It means we need to change one 12 line of code in Metal code generation, and we get to remove a ~50 LOC AST pass. 13 Also, in this case, it saves us from the compile time hit of having to run the 14 auto initialize variables phase, which takes ~1.2ms on compute_boids. 15 16 * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp: 17 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit): 18 * Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.cpp: Removed. 19 * Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.h: Removed. 20 * Modules/webgpu/WHLSL/WHLSLPrepare.cpp: 21 (WebCore::WHLSL::prepareShared): 22 * Sources.txt: 23 * WebCore.xcodeproj/project.pbxproj: 24 1 25 2019-08-06 Sam Weinig <weinig@apple.com> 2 26 -
trunk/Source/WebCore/Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp
r248307 r248310 552 552 m_stringBuilder.flexibleAppend(m_typeNamer.mangledNameForType(*variableDeclaration.type()), ' ', variableName, " = ", takeLastValue(), ";\n"); 553 553 } else 554 m_stringBuilder.flexibleAppend(m_typeNamer.mangledNameForType(*variableDeclaration.type()), ' ', variableName, " ;\n");554 m_stringBuilder.flexibleAppend(m_typeNamer.mangledNameForType(*variableDeclaration.type()), ' ', variableName, " = { };\n"); 555 555 } 556 556 -
trunk/Source/WebCore/Modules/webgpu/WHLSL/WHLSLPrepare.cpp
r248303 r248310 30 30 31 31 #include "WHLSLASTDumper.h" 32 #include "WHLSLAutoInitializeVariables.h"33 32 #include "WHLSLCheckDuplicateFunctions.h" 34 33 #include "WHLSLCheckTextureReferences.h" … … 188 187 RUN_PASS(checkLiteralTypes, program); 189 188 CHECK_PASS(checkTextureReferences, program); 190 CHECK_PASS(autoInitializeVariables, program);191 189 RUN_PASS(resolveProperties, program); 192 190 RUN_PASS(findHighZombies, program); -
trunk/Source/WebCore/Sources.txt
r248282 r248310 310 310 Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.cpp 311 311 Modules/webgpu/WHLSL/WHLSLASTDumper.cpp 312 Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.cpp313 312 Modules/webgpu/WHLSL/WHLSLInferTypes.cpp 314 313 Modules/webgpu/WHLSL/WHLSLLexer.cpp -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r248303 r248310 8325 8325 52B0D4BF1C57FD660077CE53 /* VideoFullscreenChangeObserver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoFullscreenChangeObserver.h; sourceTree = "<group>"; }; 8326 8326 52B0D4C11C57FF910077CE53 /* VideoFullscreenInterfaceMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoFullscreenInterfaceMac.h; sourceTree = "<group>"; }; 8327 52B3434922A0752200E49389 /* WHLSLAutoInitializeVariables.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLAutoInitializeVariables.h; sourceTree = "<group>"; };8328 52B3434B22A0752300E49389 /* WHLSLAutoInitializeVariables.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WHLSLAutoInitializeVariables.cpp; sourceTree = "<group>"; };8329 8327 52D5A18D1C54590300DE34A3 /* VideoFullscreenLayerManagerObjC.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = VideoFullscreenLayerManagerObjC.mm; sourceTree = "<group>"; }; 8330 8328 52D5A18E1C54590300DE34A3 /* VideoFullscreenLayerManagerObjC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoFullscreenLayerManagerObjC.h; sourceTree = "<group>"; }; … … 25497 25495 C20F88AA22966B0E00D610FA /* WHLSLASTDumper.cpp */, 25498 25496 C20F88AC22966B0F00D610FA /* WHLSLASTDumper.h */, 25499 52B3434B22A0752300E49389 /* WHLSLAutoInitializeVariables.cpp */,25500 52B3434922A0752200E49389 /* WHLSLAutoInitializeVariables.h */,25501 25497 1C6B95DD22C858A400E6F14F /* WHLSLBuildStandardLibraryFunctionMap.py */, 25502 25498 C234A9B221E92C1F003C984D /* WHLSLCheckDuplicateFunctions.cpp */,
Note:
See TracChangeset
for help on using the changeset viewer.