Fix optimize_builtin when not reducing
Summary:
We'll only run optimize_builtin if will_reduce() returns true. The
idea is that if we're not going to reduce bytecodes, there's no
point. However, optimize_builtin can do more than just reduce
bytecodes, it can push a more refined type. So, when will_reduce()
returns false, we get no benefit of any of the type analysis. This is
probably, because one of the times when will_reduce() is false, is
when we're inserting the AssertRAT opcodes.
Just drop the will_reduce() check. If will_reduce() is false, any
reductions we perform will be no-ops (but will be analyzed for their
type effects), but any pushed types will be dealt with.
Reviewed By: mofarrell
Differential Revision:
D30491072
fbshipit-source-id:
1bf5e0c86a47a454d8b4c9875369feffe6b4e08b