Closed
Bug 1039836
Opened 11 years ago
Closed 11 years ago
GVN: include the dependency() in the hash instead
Categories
(Core :: JavaScript Engine: JIT, enhancement)
Core
JavaScript Engine: JIT
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: sunfish, Assigned: sunfish)
Details
Attachments
(1 file)
|
3.07 KB,
patch
|
nbp
:
review+
|
Details | Diff | Splinter Review |
In bug 845068, when a hash lookup finds a congruent instruction with a different dependency(), it overwrites the old hash table entry on the theory that the old value will no longer be useful. This is a mistake. For example, in this CFG:
load
/ \
call load
load
We may visit the load in the left child block and discover that it has a different dependency than the load in the top block, but we still want to keep the load in the top block available for when we visit the right block.
The attached patch reverts 2b6ec15fea1b and adds code to MDefinition::valueHash to include the dependency() field in the value hash. With this change, the old values are left in the hash table, but they get spread out among many buckets instead of all being in one.
Attachment #8457654 -
Flags: review?(nicolas.b.pierron)
Comment 1•11 years ago
|
||
Comment on attachment 8457654 [details] [diff] [review]
gvn-hash-dependency.patch
Review of attachment 8457654 [details] [diff] [review]:
-----------------------------------------------------------------
I agree this is the way to go, but I do not think it matters as of today due to the way the dependencies are filled in our alias analysis. Sadly, in your example, our alias analysis will mention that the load on the right depends on the call from the left. (due to RPO)
if the left-right blocks are swapped, then the RPO will visit the left block first and we should be able to alias the loads.
We need to improve our alias analysis such as we can have better dependencies. I intend to do that as soon as I am done with the scalar replacement of arrays, as the alias analysis should reuse the same kind of traversal/transformation as the scalar replacement.
Attachment #8457654 -
Flags: review?(nicolas.b.pierron) → review+
Comment 2•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in
before you can comment on or make changes to this bug.
Description
•