sdk
sdk copied to clipboard
[vm] Inlining heuristics should take into account instruction sizes
Not all instructions at the inlining phase result in the same number of bytes of code. Inlining heuristics should do a better job of predicting code size.
In particlar,
- [ ] Redefinitions reference existing values, so potentially generate no code.
- [x]
GenericCheckBoundsannotated withpragma('vm:unsafe:no-bounds-checks')generates no code. - [ ] The
length()input toGenericCheckBoundsannotated withpragma('vm:unsafe:no-bounds-checks')often becomes dead after the check is removed.
//cc @alexmarkov