Open Bug 774075 Opened 12 years ago Updated 2 years ago

IonMonkey: eliminate redundant lower bound checks

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect

Tracking

()

People

(Reporter: evilpie, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [ion:t])

Attachments

(1 file)

For code like this we currently emit three lower bound checks.

var n = 0;
for (var i = 0; i < (a.length - 4); i++) {
  n = a[i] + a[i + 1] + a[i + 2];
}

We should just more or less duplicate ion::EliminateRedundantBoundsChecks for MBoundsCheckLower.
Attached patch WIPSplinter Review
Pretty straight forward, just duplicated to the logic for MBoundsCheck in EliminateRedundantBoundsChecks the pass and adopted it for MBoundsCheckLower.
Assignee: general → evilpies
Status: NEW → ASSIGNED
Blocks: IonSpeed
No longer blocks: IonMonkey
Whiteboard: [ion:t]
I think Brian changed a lot of this stuff recently. Is this useful?
Hmm, I think this could be used to eliminate checks, but MBoundsCheckLower will only be introduced when we were able to hoist a check from the loop and thus the eliminated checks will always be in loop preheaders rather than the loop body.
This could be an easy fix.
Assignee: evilpies → general
Status: ASSIGNED → NEW
Assignee: general → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: