Closed Bug 678812 Opened 13 years ago Closed 6 years ago

IonMonkey: Lowering produces a graph containing blocks ending in GOTO with two successors

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: adrake, Unassigned)

References

Details

(Whiteboard: [ion:t])

Attachments

(2 files)

Attached file Test case
See attached test case and CFG post-lowering (courtesy of sstangl's iongraph).
Unless this is causing problems for LSRA, this might be WONTFIX - lowering tries to change constant conditional to jumps to unconditional jumps. It still emits all paths, but it will never take one of the branches. It's mostly for |while (true)| but I doubt it really matters.
This causes a couple issues, not just in LSRA, if the dead branch is nontrivial. For one, LSRA still has to allocate on that branch, which can lead to lots of unnecessary split intervals in one of the branches, potentially the live one.

Additionally, if we emit these dead nontrivial basic blocks, we're needlessly jumping around them and throwing away icache locality. This gets worse if these dead blocks happen to get stuck in a loop.

No correctness issues as far as I can tell, but performance can suffer a lot I suspect.
Yeah, it won't be as ideal as eliminating the branch in MIR, but it's not any *worse* an emitting a cmp+jcc instead, right?
Bit late on this, but Bug 669796 would solve this issue as a side effect (and I should have time to implement it in the recent future).
Bug 669796 is now bug 1029830.
Depends on: 1029830
Assignee: general → nobody
No longer reproducible, therefore closing as WFM.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: