Closed
Bug 903410
Opened 11 years ago
Closed 11 years ago
Fix LSRA to eliminate some redundant stores
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: jandem, Assigned: jandem)
Details
Attachments
(2 files)
1.89 KB,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
6.18 KB,
patch
|
Details | Diff | Splinter Review |
Marty and Doug mentioned a redundant store on ARM on the asm.js nsieve benchmark. I wrote the attached patch to get rid of some redundant spills. dougc tested the patch and it doesn't get rid of this particular store, but at least on x86 it does eliminate spills on almost all benchmarks I tried, so I'd like to get this in. On x86, the patch eliminates ~176 spill instructions on the asm.js fannkuch ubench and wins about 10%. There also seem to be small wins on other benchmarks.
Attachment #788123 -
Flags: review?(bhackett1024)
Assignee | ||
Updated•11 years ago
|
Summary: Fix LSRA to eliminate some some redundant stores → Fix LSRA to eliminate some redundant stores
Assignee | ||
Comment 1•11 years ago
|
||
If a value is spilled at the loop header, don't spill it before the backedge. This patch gets rid of the store Marty and Doug found on ARM with the nsieve benchmark. It also eliminates a spill on x86 in Octane-crypto am3 and a bunch of other spills on Kraken/Octane/SS. Problem is, this optimization confuses the regalloc verifier. The patch fixes this by adding "hints" to the movegroup in debug builds, but it's a bit lame. Brian, can you think of a way to fix the verifier that's not so gross? If it's a win somewhere we can take this patch but I'm a bit unhappy about the verifier workaround.
Attachment #788251 -
Flags: feedback?(bhackett1024)
Comment 2•11 years ago
|
||
First patch gives me a 10% speedup on lua-binarytrees and lua-scimark, 5% speedup on zlib, and various other small speedups. Second patch on top of that appears to give some small speedups, but within the range of noise so not sure, but the fact most of the small changes are in the right direction is a good indication.
Comment 3•11 years ago
|
||
(all on 64-bit linux)
Updated•11 years ago
|
Attachment #788123 -
Flags: review?(bhackett1024) → review+
Assignee | ||
Comment 4•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/6d3458473c20
Comment 5•11 years ago
|
||
Comment on attachment 788251 [details] [diff] [review] Part 2 Review of attachment 788251 [details] [diff] [review]: ----------------------------------------------------------------- How is the verifier getting confused here? Can you post a testcase which triggers the verifier assert? It seems like a bug in the verifier itself, the backwards flow analysis done there should be able to cope with vregs that are only spilled in the loop preheader.
Comment 6•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/6d3458473c20
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Updated•11 years ago
|
Attachment #788251 -
Flags: feedback?(bhackett1024)
You need to log in
before you can comment on or make changes to this bug.
Description
•