Optimize ConcatStrStr pairs to ConcatStr3
commit25d8341f9750a8825dcdb7762d0bc9843814520f
authorOguz Ulgen <oulgen@fb.com>
Sat, 5 Jun 2021 04:12:27 +0000 (4 21:12 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Sat, 5 Jun 2021 04:13:47 +0000 (4 21:13 -0700)
tree59a123c8db26f34c170452efde713d8e733a1e37
parent7129961b065be6369153e88268d070ce3c14ff0e
Optimize ConcatStrStr pairs to ConcatStr3

Summary:
When we see a pattern where
```
t1 = ConcatStrStr a b
t2 = ConcatStrStr t1 c
```
we can convert this into
```
t2 = ConcatStr3 a b c
```
if all uses of `t1` are
* `t2 = ConcatStrStr t1 c`
* `Decref t1`
* `StStk` in catch traces

Note: `StStk` in catch traces comes from bringing the unwinder to a consistent state so that it properly unwind the stack.

Reviewed By: ottoni

Differential Revision: D28293952

fbshipit-source-id: 216c47d2400af57bb89fd8d9df1acdc357b00a90
hphp/runtime/vm/jit/dce.cpp