Closed
Bug 669796
Opened 13 years ago
Closed 10 years ago
IonMonkey: perform unreachable code elimination during GVN
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
DUPLICATE
of bug 1029830
People
(Reporter: rpearl, Assigned: rpearl)
References
(Blocks 1 open bug)
Details
(Whiteboard: [ion:t])
Follow up to Bug 659729.
I think it's probably natural to perform unreachable code elimination during the GVN pass--I'll see if I can make this work.
Comment 1•13 years ago
|
||
Could you summarize your design/algorithm idea here?
Assignee | ||
Comment 2•13 years ago
|
||
Sorry, this dropped out of sight. The algorithm would be something like:
Assume that the start block is reachable. Assume that all other blocks and edges are unreachable.
Examine control flow instructions during GVN: If an outgoing edge can be followed, mark it reachable. Once an edge becomes reachable, the target blocks of that edge become reachable.
Inputs of phi nodes from unreachable edges are ignored.
Comment 3•13 years ago
|
||
Is this still needed?
Updated•12 years ago
|
Whiteboard: [ion:t]
Comment 4•12 years ago
|
||
Bug 620767 provides a similar optimization, though it is not integrated with GVN.
Comment 5•12 years ago
|
||
My mistake, bug 620676
Comment 6•12 years ago
|
||
Sorry for the spam! I cannot type, apparently. Bug 820676!
Comment 8•12 years ago
|
||
One advantage to doing the integration proposed in this bug would be better handling of code like the following:
if (foo() && false) { ... }
In this case we currently fail to optimize away the body. This is because the |foo() && false| is first stored into a variable, and at the time the pass runs the constants have not been fully propagated. This situation arises in self-hosted code for ParallelArray, where inlined functions are often evaluated to true or false to select different control flow in sequential or parallel mode.
Comment 9•10 years ago
|
||
The new GVN implementation (bug 1004363) is capable of this. Bug 1029830 tracks enabling it.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•