[turbofan] Eliminate a few redundant bounds checks.
Usually loops run from 0 to some array length l, which means the induction variable i will probably have type Unsigned32, just like the length l. The CheckBounds operation lowers to an Uint32LessThan comparison, so if we also lower the user level i < l comparison to Uint32LessThan (whenever possible), we get some bounds check elimination for free (via value numbering plus branch condition elimination). This merges the branch condition elimination phase with the late optimization phase to make this magic happen. R=jarin@chromium.org BUG=v8:4930,v8:5141 Review-Url: https://codereview.chromium.org/2135123002 Cr-Commit-Position: refs/heads/master@{#37629}
Showing
Please
register
or
sign in
to comment