[turbofan] Optimize silent hole checks on legacy const context slots.
authorbmeurer <bmeurer@chromium.org>
Fri, 10 Apr 2015 10:28:06 +0000 (03:28 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 10 Apr 2015 10:28:12 +0000 (10:28 +0000)
commit35f6c0fdbf7814428d9fdec65cb24c8d4ed17452
treea4b35428779cab4add4191a58cdc1ff9f239a6e1
parentc0593a1fc8519a8e0eaf3627fa12bcf4ba80e8a8
[turbofan] Optimize silent hole checks on legacy const context slots.

Currently we always generate a diamond in the graph builder for every
legacy const context slot, which we cannot get rid of until late control
reduction, even if we know after context specialization that the slot is
already initialized.

Now we generate a select instead, which the CommonOperatorReducer
happily removes during typed lowering. This greatly speeds up asm.js
code generated by Emscripten with the new POINTER_MASKING mode.

R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/1072353002

Cr-Commit-Position: refs/heads/master@{#27739}
src/compiler/ast-graph-builder.cc
src/compiler/common-operator-reducer.cc
test/mjsunit/asm/pointer-masking.js [new file with mode: 0644]
test/unittests/compiler/common-operator-reducer-unittest.cc