Open Bug 771835 Opened 12 years ago Updated 3 months ago

IonMonkey: handle x[v + i] during bounds check hoisting

Categories

(Core :: JavaScript Engine, defect, P5)

Other Branch
x86
macOS
defect

Tracking

()

People

(Reporter: bhackett1024, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [ion:t])

Attachments

(1 obsolete file)

Bounds check hoisting currently fails for accesses of the form x[v + i], when x and v are loop invariant. Array traversals in autoranslated code will look like this, rather than the usual x[i], as x is a big typed array and v is the base address of some allocated subarray of x.
Attached patch patch (obsolete) — Splinter Review
Assignee: general → bhackett1024
Attachment #639994 - Flags: review?(dvander)
Blocks: IonMonkey
Comment on attachment 639994 [details] [diff] [review] patch Review of attachment 639994 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/ion/LICM.cpp @@ +465,5 @@ > > + // Check if lhs in the conditional matches the bounds check index, in > + // either the form (lhs + indexN) or (lhs + extra + indexN) for loop > + // invariant extra. The latter pattern is important for JS translated from > + // C/C++, where the accessed array is a giant typed array and y indicates What does "y" refer to in this comment? @@ +504,2 @@ > return; > + } while (0); Please separate out the above block into a separate function, since tryHoistBoundsCheck is getting pretty long.
Attachment #639994 - Flags: review?(dvander) → review+
Attachment #639994 - Attachment is obsolete: true
Attachment #639994 - Flags: review+
Assignee: bhackett1024 → general
Assignee: general → nobody
Severity: normal → S3

This was motivated by asm.js and its predecessors, which have all been superseded by wasm. Unless we see other real-world examples of this pattern, it's not a high priority.

Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: