Closed Bug 1044202 Opened 10 years ago Closed 8 years ago

IonMonkey: Add Scalar Promotion of Stores.

Categories

(Core :: JavaScript Engine: JIT, defect, P5)

defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: nbp, Assigned: nbp)

References

Details

Attachments

(1 file)

Currently DCE is only capable to remove unused or side-effect free instructions. By having a precise alias analysis (Bug 897606), and recording potentially recoverable effectful instructions (Bug 991720), we would be capable of removing consecutive stores, even if the object/array is escaped. Aside to this implementation, improving our alias analysis based on the result of the escape analysis (Bug 856533), would provide us enough information to DCE the stores from non-escaped objects as well as their allocations as this is currently done.
Depends on: 1049691
I am currently working on this bug, and I will have a working version in a few days. The scalar promotion is working by taking a store and promote it to a register until it is aliased. This optimization cannot be implemented as easily as on static languages because every side-exit represented by a resume point need to see the side-effect (Bug 991720) registered in the resume point. The scalar promotion algorithm, as implemented so far, is expressed on top of the EmulateStateOf<MemoryView> algorithm which walk the control flow graph in RPO and record the side-effect in every resume point. This approach, as opposed to the ObjectState memory view, is a bit more challenging as we do not necessary have a full knowledge of the memory state. Such sparse knowledge is unfortunately needed for crossing join-blocks such as loop headers.
Status: NEW → ASSIGNED
Summary: IonMonkey: DCE effectful instructions. → IonMonkey: Add Scalar Promotion of Stores.
This diff is just a Work-In-Progress of all the patches. It pass the test suite except for a few timeouts that I still have to investigate. It will also need additional heuristics to prevent eager optimizations, which were useful for finding corner cases of the algorithm.
Even if this would be nice to have the current approach is too complex.
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Priority: -- → P5
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: