Misc LdFrameThis optimizations
Summary:
Frame state was storing information about the frame context, but the
logic wasn't complete (the merge operation wasn't even
implemented!). It only worked for inlined functions. Fix the issues
and make it work for all functions. This allows frame state to track
the known context type, and refine and elide loads as necessary.
Load-elim was not refining LdFrameThis/LdFrameCls even though it could
already easily.
I noticed GVN would sometimes add a SSATmp usage beyond a CheckType or
AssertType on that SSATmp. If GVN does anything, run refineTmps() to
take advantage of CheckTypes or AssertTypes.
Finally, I noticed in one trace that we weren't inlining an absolutely
trivial function (it simply returned false). This is because for
whatever reason we didn't have any profiling information for the
function. Add a heuristic to the inlining decider to attempt to inline
such functions anyways (take no arguments and return a known
constant).
Reviewed By: paulbiss, jano
Differential Revision:
D30938880
fbshipit-source-id:
bba5837f6da4daad292b28c15c1354308e4797d0