Make predicted inner ref types independent of BoxedCell ssatmp types
Summary: This does part of the job of getting inner types to be factual
(PtrToFoo types isn't in this diff). This diff adds PredictLocInner and
PredictStkInner opcodes that let frame-state track a good predicted type for
the inside of boxed values, and makes users look at those types to decide what
kind of LdRef to emit. It also refactors minstr-translator to deal with
potentially boxed base types through this (and call simpleCollectionOp less
often---it was genning a bunch of loads just to find out types).
This diff is landable but there's more to do in follow up diffs. I'm putting
it up as is to make sure people are ok with some not measurable, but "strictly
worse" changes in what the JIT does here:
- checkTypeStack now always spills the stack if the type is boxed.
Otherwise we have nowhere to track a prediction unless we add a
PredictType opcode---after we break up spill stack this won't matter
(because it will just change a frame state value also); and I perflabbed
it independently and it's in the noise, so I'd rather just wait on that.
- This removes the ability to relax guards on inner types of boxes. I
implemented something that does that again in another version of this
diff: basically it treated LdRef opcodes as isGuardOps, and gives them an
outer constraint that served the same purpose as the old inner constraint.
But this was quite a regression (something important somewhere must not
have been constraining the value on one of them, but I couldn't find it).
Since this diff is in the noise without that, I'd like to just move
forward if no one has strong objections. (There's a fair bit of code
relating to inner constraints that can go away with either approach here,
but I'll do that in a follow up diff.)
Reviewed By: @swtaarrs
Differential Revision:
D1656055
Signature: t1:
1656055:
1415215686:
07c100474f89263eee9fc36d00d0674efb5406de