Files
sdk/runtime
Alexander Markov 3cc0cea37e [vm] Implement gradual refinement of types
Before this CL, each invocation of FlowGraphTypePropagator discarded
(overwritten) all previously inferred types. Due to re-structuring of
the IR (for example, InstanceCall to _simpleInstanceOf may be replaced
with various IR sequences), FlowGraphTypePropagator may yield
better or worse results (for example, not all replacements of
_simpleInstanceOf are recognized by FlowGraphTypePropagator).

As the result, inferred type information could be lost at later
stages of the compilation pipeline. Code generation, which looks
at the types may not see the same types as earlier stages of
compilation pipeline, so EmitNativeCode() may generate code which is
out of sync with ComputeCanDeoptimize().

This CL introduces refinement of types: old type is no longer
blindly replaced with newly inferred type. Instead, more specific type
is selected among new and old types. Conservatively, the new type is
preferred if the types are unrelated (it could happen in certain
corner cases, such as unreachable code).

This CL also contains the following minor changes:

* Fix reaching type of the CheckSmi argument when CheckSmi is moved
  in LICM::TrySpecializeSmiPhi. It looks like it was previosuly
  unnoticed due to full recomputation of types in type propagator.

* Rename local variables to better follow style guide (follow-up
  to my previous change).

* Handle kNE along with other comparisons in AOT.

R=rmacnak@google.com, vegorov@google.com

Issue: https://github.com/dart-lang/sdk/issues/30480
Review-Url: https://codereview.chromium.org/3010673002 .
2017-08-30 12:12:17 -07:00
..
2017-08-30 10:18:09 -07:00
2017-08-29 07:15:06 -07:00
2017-08-04 22:19:35 -07:00
2017-08-18 08:51:40 -07:00