Introduce TopStructLayout
Summary:
Introduce this abstract layout. It passes is_struct, so we can use LdStructDictElem and StructDictSet with it; modify those irlower routines to handle the abstract case. (We want to include the abstract layout in is_struct to match other predicates like "monotype", where it's essential; adding it in is not a problem because any caller that wants to limit to concrete StructLayout can still do so.)
Add type inference for TopStructLayout, extending StructLayout and fixing bugs while we're at it. For example, StructLayout::elemType would incorrectly return TBottom if its keyType couldBe TInt. It's safe because we don't have mixed key inputs for any of these ops, but we should fix it. Please review these changes carefully.
Add layout selection for TopStructLayout. We now will probabilistically specialize sinks to either a specific struct layout or to the top struct layout, even if they include some non-struct inputs.
Reviewed By: colavitam
Differential Revision:
D27767113
fbshipit-source-id:
fdd7255244aef59a9ae8edb494e4b6a31bdb571a