dart-sdk/pkg/vm/lib/testing
Vyacheslav Egorov c3d8f46c5b [vm/compiler] Devirtualize calls while inlining.
Inlined functions might contain call-sites which can be devirtualized
in the context of the caller. To achieve that we add a pass which
calls canonicalization on all dynamic calls (and their data
dependencies) between rounds of inlining.

More specifically this helps cases which require interleaving
some redundancy elimination and inlining to remove the cost of
abstractions. The primary example is for-in loop with an array of
a known type which usually requires inlining `get:iterator` and
propagating iterable value through interator's fields to specialize
and inline `get:length` and `operator[]` on the `Iterable`.

See https://github.com/dart-lang/sdk/issues/48433 for example.

TEST=vm/dart/devirtualization_during_inlining_il_test

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-product-x64-try
Change-Id: I1fae50484a111f8c21c81bcf0c3d6a63a856338a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279517
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2023-01-26 08:52:18 +00:00
..
il_matchers.dart [vm/compiler] Devirtualize calls while inlining. 2023-01-26 08:52:18 +00:00