Remove forced type changes when they can't deopt
authorm.m.capewell@googlemail.com <m.m.capewell@googlemail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 12 Jun 2014 16:47:51 +0000 (16:47 +0000)
committerm.m.capewell@googlemail.com <m.m.capewell@googlemail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 12 Jun 2014 16:47:51 +0000 (16:47 +0000)
commit649057e05cbf07b36b3639978e8e92b253c2a33e
tree935661509b12ef2735757b156edf9b1435a161f6
parent301ae7dd561a9357bace5456aa5ba4f381d51ad9
Remove forced type changes when they can't deopt

Hydrogen attempts to force representation changes on certain operations in order
to deoptimise on the change rather than the operation. However, these forced
changes are often unnecessary on 64-bit platforms, and cause poor code
generation, so this patch makes some of them conditional on whether it's
possible for deoptimisation to occur in the change.

On ARM64, this prevents sequences like:
                  ;;; <@46,#89> smi-tag
0x7ff282c7f050   144  lsl x4, x4, #32
                  ;;; <@48,#90> smi-untag
0x7ff282c7f054   148  asr x5, x4, #32
                  ;;; <@50,#31> mul-const-i-s
0x7ff282c7f058   152  lsl w6, w5, #3

BUG=
R=jkummerow@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21818 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/hydrogen-representation-changes.cc