Closed
Bug 774075
Opened 13 years ago
Closed 9 months ago
IonMonkey: eliminate redundant lower bound checks
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: evilpies, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [ion:t])
Attachments
(1 file)
|
8.72 KB,
patch
|
Details | Diff | Splinter Review |
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.
| Reporter | ||
Comment 1•13 years ago
|
||
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
Updated•13 years ago
|
| Reporter | ||
Comment 2•13 years ago
|
||
I think Brian changed a lot of this stuff recently. Is this useful?
Comment 3•13 years ago
|
||
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.
| Reporter | ||
Updated•12 years ago
|
Status: ASSIGNED → NEW
| Assignee | ||
Updated•11 years ago
|
Assignee: general → nobody
Updated•3 years ago
|
Severity: normal → S3
Comment 5•9 months ago
|
||
Still relevant?
Comment 6•9 months ago
|
||
ion::EliminateRedundantBoundsChecks no longer exists. It looks to me like, at least in this case, range analysis already eliminates two of the three bounds checks. Combined with Brian's observation (which still seems to be true) that we only get these lower bounds checks when hoisting code outside of hot inner loops, and the general riskiness of messing around with bounds checks (from a security bug perspective), I think we can close this.
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•