Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ba9ef0e90d4fcf761af62ba00df66efa57a57776
https://github.com/WebKit/WebKit/commit/ba9ef0e90d4fcf761af62ba00df66efa57a57776
Author: Tadeu Zagallo <[email protected]>
Date: 2023-02-23 (Thu, 23 Feb 2023)
Changed paths:
M Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
Log Message:
-----------
[JSC] Add peephole optimization for consecutive moves
https://bugs.webkit.org/show_bug.cgi?id=252830
rdar://105834848
Reviewed by Keith Miller.
Add a BytecodeGenerator peephole optimization for removing redundant consecutive
moves into the same virtual register. It isn't very common, but looking at real
world data I see a few hundreds of moves that could be eliminated with a trivial
optimization. A contrived example is the following program:
```
{ if (true) { } }
```
This generates 3 consecutives `mov dst:loc6, src:Undefined`.
* Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::initializeVarLexicalEnvironment):
(JSC::BytecodeGenerator::moveLinkTimeConstant):
(JSC::BytecodeGenerator::moveEmptyValue):
(JSC::BytecodeGenerator::emitMove):
Canonical link: https://commits.webkit.org/260786@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes