Description[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
Committed: https://crrev.com/4f97632880d38a0e1b29f4ce4b468457fc2d82f3
Cr-Commit-Position: refs/heads/master@{#37629}
Patch Set 1 #Patch Set 2 : Fix BranchElimination to play well with the other reducers. #
Dependent Patchsets: Messages
Total messages: 17 (8 generated)
|