Further improve the DecRef code sequence using PGO
Summary:
This diff extends the DecRefProfile to count the frequency of each of the 4
possible cases for a generic DecRef:
a) uncounted
b) counted type, but persistent (count < 1)
c) counted type, and gets released (count == 1)
d) counted type, and survives the DecRef (count > 1)
This information is then used in Optimize translations to further specialize the
code for the most common case. This can save one branch for the most common
case. Note that the previous sequence was the optimal for the release case (c),
which is unlikely to be the most common. This diff also uses this profile
information to decide whether to put the rare cases in the cold code area (we
were only doing this for the release path).
Reviewed By: paulbiss
Differential Revision:
D5262937
fbshipit-source-id:
927f6908ab245c020dd932811f6d11cdc513c6da