[webkit-changes] [WebKit/WebKit] 6d88e2: Reduce size of code emitted for stack loads/stores...
EWS
noreply at github.com
Wed Feb 22 10:18:40 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6d88e2681672a4fac3e20dca5f30a253ea51f2af
https://github.com/WebKit/WebKit/commit/6d88e2681672a4fac3e20dca5f30a253ea51f2af
Author: Max Rottenkolber <maximilian at igalia.com>
Date: 2023-02-22 (Wed, 22 Feb 2023)
Changed paths:
M Source/JavaScriptCore/b3/B3LowerToAir.cpp
M Source/JavaScriptCore/b3/air/AirAllocateRegistersAndStackAndGenerateCode.cpp
M Source/JavaScriptCore/b3/air/AirArg.h
M Source/JavaScriptCore/b3/air/opcode_generator.rb
Log Message:
-----------
Reduce size of code emitted for stack loads/stores from Air on ARM
https://bugs.webkit.org/show_bug.cgi?id=252469
Reviewed by Yusuke Suzuki.
This changes callFrameAddr (AirAllocateRegistersAndStackAndGenerateCode.cpp)
and its users to (which ever succeeds first)
1. generate an address offset from GPRInfo::callFrameRegister
(unchanged)
2. generate an address offset from MacroAssembler::stackPointerRegister
3. load the offset into extendedOffsetAddrRegister and generate
a BaseIndex [GPRInfo::callFrameRegister, extendedOffsetAddrRegister]
4. resort to computing the absolute address in extendedOffsetAddrRegister
(this was the previous fallback after 1.)
For 3. to work reliably we need to change Air::Arg::isValidForm
to reject BaseIndex addressing when it is not supported on ARM.
The result of these changes is a significant reduction in code size
due to avoiding the fallback behavior in many cases (4).
Code generated for the JetStream2 WASM benchmarks is ~30% smaller on ARMv7
and ~40% smaller on ARM64.
* Source/JavaScriptCore/b3/air/AirAllocateRegistersAndStackAndGenerateCode.cpp:
(JSC::B3::Air::callFrameAddr):
(JSC::B3::Air::GenerateAndAllocateRegisters::flush):
(JSC::B3::Air::GenerateAndAllocateRegisters::alloc):
* Source/JavaScriptCore/b3/air/AirArg.h:
(JSC::B3::Air::Arg::isValidAddrForm):
(JSC::B3::Air::Arg::isValidForm const):
Canonical link: https://commits.webkit.org/260680@main
More information about the webkit-changes
mailing list