Baseline and Ion must be independent of Frame::tls
Categories
(Core :: JavaScript: WebAssembly, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox78 | --- | affected |
People
(Reporter: dbezhetskov, Assigned: dbezhetskov)
Details
Attachments
(1 file)
We are moving to the new ABI (https://docs.google.com/document/d/1oi6ROZJuE-hBb21Tgq-XcUegPktecF52gADzBJcYL34) where we don't want to preserve TLS pointer in the Frame.
In this bug, we are going to untie Baseline and Ion from Frame::tls, but we aren't going to touch runtime as FrameIteration or stackMaps tracing now.
For Baseline, we need to introduce a new private stack slot to store WasmTlsReg and reload it when we need it. We need this because Baseline can clobber WasmTlsReg.
For Ion, we are going to make a dependency of tlsParam on the return node to force Ion to restore the initial value of Tls.
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
We are going to get rid of the TLS slot in the Frame because we don't
need it all the time. Now it consumes one stack slot in Frame and forces
the Frame to add one additional padding slot for arm64.
In this patch we are removing dependency from Frame::tls in Baseline.
Note that we need to allocate a stack slot for WasmTlsReg value because
baseline can clobber WasmTlsReg and we should be able to load it when we
need it. For example, when we need access to the Instance*.
The followup patch will do the same for the Ion compiler.
Assignee | ||
Comment 2•4 years ago
|
||
Actually, I want to postpone the Ion bits because now Ion "thinks" that tlsParam is immutable.
We support that invariant at the Codegen level just by reloading WasmTlsReg if it needed, see https://searchfox.org/mozilla-central/source/js/src/jit/CodeGenerator.cpp#8062
With trampolines, we could just eliminate that reloading and preserve LWasmCallBase::isCallPreserved()
because trampolines guarantee that WasmTlsReg won't be changed after any call.
I'm going to add this Ion bits right before eliminating Frame::tls.
Assignee | ||
Updated•4 years ago
|
Pushed by rmaries@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a9970903e180 Make Baseline free from frame's tls r=wingo,lth
Comment 4•4 years ago
|
||
bugherder |
Comment 5•4 years ago
|
||
The leave-open keyword is there and there is no activity for 6 months.
:lth, maybe it's time to close this bug?
Comment 6•4 years ago
|
||
Dmitry, are we done here?
Updated•4 years ago
|
Updated•4 years ago
|
Description
•