Open Bug 772265 Opened 14 years ago Updated 2 years ago

IonMonkey: Redundant movegroups in loop backedge (SM is 5x-6x slower than Chrome)

Categories

(Core :: JavaScript Engine: JIT, defect)

x86_64
Linux
defect

Tracking

()

People

(Reporter: sstangl, Unassigned)

References

(Blocks 3 open bugs)

Details

(Whiteboard: [ion:t])

Attachments

(2 files)

Register allocation displays local silliness on a small allocation benchmark from dvander, related to earley-boyer. In the attached PNG image of the LIR after regalloc, Block 26 contains the following instructions: (%esi is the loop counter) > movegroup ()[=esi -> =eax] > addi ([i:62 (=eax)]) (=eax), (c) > movegroup ()[=eax -> =esi] This is done in order to preserve the original value in a register in the case of bailout. We could trivially save a register move by reversing the logic to instead allocate a register for purposes of preserving the original value: > movegroup ()[=esi -> =eax] > addi (i:62 (=esi)]) (=esi), (c) (Range analysis should also let us know that the add in question is infallible.)
Attached file Benchmark used. —
Assignee: general → nobody
Component: JavaScript Engine → JavaScript Engine: JIT
Blocks: 1701164
Blocks: sm-regalloc
Severity: normal → S3

Nightly: https://share.firefox.dev/3BDuWBB (starts at 140ms, after multiple refreshes/reloads stabilizes at 96ms without the profiler)
Chrome: 24ms

Testcase with 100x the loopcount:

Nightly: 10s-13s without the profiler (https://share.firefox.dev/4h3rMaC)
Chrome: 2.2s

Summary: IonMonkey: Redundant movegroups in loop backedge → IonMonkey: Redundant movegroups in loop backedge (SM is 5x-6x slower than Chrome)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: