Track catch blocks' SrcKey instead of PC in store-elim
commitb29210e1103b5e55e0235a68de34283b8ea1776a
authorJan Oravec <jan@fb.com>
Thu, 24 Jun 2021 19:27:32 +0000 (24 12:27 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 24 Jun 2021 19:29:03 +0000 (24 12:29 -0700)
treea969fad7da1507ee2484b47f99a9c572e0e243d9
parenta777fb441b25a5ad64a775141a26bd248f865504
Track catch blocks' SrcKey instead of PC in store-elim

Summary:
Function bodies will soon contain code emitted at FuncEntry positions, which do
not have any associated PC. They may contain instructions with catch blocks,
such as CheckSurpriseAndStack. Store-elim tracks PC of BeginCatch instructions,
which won't work, so track SrcKey instead. PC is later obtained by InlineCall
and InlineReturn opcodes, but we don't have these in catch blocks of top level
functions, so this is safe.

Reviewed By: ricklavoie

Differential Revision: D29288231

fbshipit-source-id: 9e23b7ada5fb4046465a59f28bb68a5877991dc8
hphp/runtime/vm/jit/store-elim.cpp