Use get instead of rvalVanilla in JIT getters
commit9435b2efe6a688718cd229b92f7957b6dc8c08ba
authorShaunak Kishore <kshaunak@fb.com>
Thu, 23 Apr 2020 15:32:07 +0000 (23 08:32 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 23 Apr 2020 15:34:52 +0000 (23 08:34 -0700)
treefbdce9181dd70c564663b7f2a60497724653b8cf
parent52dcae1bdbf2d8b563cbb6526fdc5dc79a1f0a62
Use get instead of rvalVanilla in JIT getters

Summary:
As alexeyt pointed out, these JIT helpers are logically reading an array value, so we don't need to use the tv_rval const-ref type here.

Using get may cause us to generate another branch here, because get uses rval internally and branches on whether it's null, then we branch again on whether the TypedValue is init. As long as perf overall is flat, we're okay. In fact, this change looks like a small (~0.1%) load-store win.

Reviewed By: ricklavoie

Differential Revision: D21197185

fbshipit-source-id: ffcc97e67e336f50c71bdbc30f5e90db157edc0f
hphp/runtime/vm/jit/minstr-helpers.h
hphp/runtime/vm/jit/translator-runtime.cpp