You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
https://bugs.webkit.org/show_bug.cgi?id=293337
rdar://151740794
Reviewed by Yijia Huang and Justin Michaud.
The current MovHintRemoval's analysis looks weird. We should just do liveness
analysis globally and use this information for MovHint removal.
1. "Use" is a node which may exit. When exit happens, we should keep all
use of live locals at this bytecode exit location alive.
2. "Def" is MovHint. We kill the locals here.
And doing fixpoint analysis and using this information to remove
MovHint.
Also, pruning Availability in OSRAvailabilityAnalysisPhase via bytecode
liveness is wrong: they need to keep live nodes from DFG for example.
0: PutHint @x, PROP(@y)
1: OSR exit point #1 (here, loc0 is not alive)
2: -- Pruning happens --
3: MovHint @x, loc0
4: OSR exit point #2 (here, loc0 is alive)
In this case pruning point will remove (0)'s heap availability since @x is
not alive from bytecode at (1), but this is wrong as we need this in (4).
In this patch, we remove pruneByLiveness in DFGOSRAvailabilityAnalysisPhase.
This pruning should happen by the user of DFGOSRAvailabilityAnalysisPhase instead,
and it is already happening (see FTLLowerToB3's pruneByLiveness in exit
site, which is right. And ObjectAllocationSinking is pruning with
CombinedLiveness, this is right since it also accounts Node's liveness
in addition to bytecode's liveness.). Let's just make availability just
compute the availability for all things, and then we prune some of
unnecessary ones at each use of this information.
* Source/JavaScriptCore/dfg/DFGMovHintRemovalPhase.cpp:
* Source/JavaScriptCore/dfg/DFGOSRAvailabilityAnalysisPhase.cpp:
(JSC::DFG::OSRAvailabilityAnalysisPhase::run):
Canonical link: https://commits.webkit.org/295369@main
0 commit comments