Make comparison IR ops layout agnostic
commit28a51932dc5004e489ddedfbda358a77e2bf4057
authorMichael Colavita <mcolavita@fb.com>
Sat, 12 Sep 2020 04:14:22 +0000 (11 21:14 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Sat, 12 Sep 2020 04:17:47 +0000 (11 21:17 -0700)
treed67894895c17a675be1a67eddbc6c5ff2e8e6444
parent5d5b8fed75a24ed34187a1ecb88c9170abb37c4d
Make comparison IR ops layout agnostic

Summary:
Make comparison IR ops layout-agnostic by dispatching to the generic ArrayData helper. These ops are relatively cold in strobelight, so we anticipate a negligible perf impact. This allows us to mark the associated bytecodes as layout-agnostic.

To preserve optimizations, keyset comparisons (which do not reenter or throw) are explicitly flagged to still allow DCE and similar optimizations.

Furthermore, the Vec comparison helpers have been removed, and the ArrayData ones have been updated to account for the inconsistent vec/varray comparison behavior until it's migrated safely.

Differential Revision: D23588960

fbshipit-source-id: 88a0b4c08cbe9f64a14e2e26a374db179957cd1c
15 files changed:
hphp/doc/ir.specification
hphp/runtime/base/array-data.cpp
hphp/runtime/base/packed-array.cpp
hphp/runtime/base/packed-array.h
hphp/runtime/base/tv-comparisons.cpp
hphp/runtime/vm/jit/dce.cpp
hphp/runtime/vm/jit/gvn.cpp
hphp/runtime/vm/jit/ir-instruction-inl.h
hphp/runtime/vm/jit/ir-opcode.cpp
hphp/runtime/vm/jit/irgen-arith.cpp
hphp/runtime/vm/jit/irgen-bespoke.cpp
hphp/runtime/vm/jit/irlower-cmp.cpp
hphp/runtime/vm/jit/memory-effects.cpp
hphp/runtime/vm/jit/native-calls.cpp
hphp/runtime/vm/jit/simplify.cpp