00edd9756b
Moves AllocateObject and CreateArray instructions down to their dominant use (use that dominates all other uses) when such a use exists and the move is not hampered by environment uses (which can happen when the allocation is inside a try block). This improves write barrier elimination for inlined constructors, since it moves the allocation after evaluation of the arguments. Any Dart calls in an argument would disable elimination after it. The optimization is particularly effective for Flutter Widget code, since such code typically contains many nested constructor calls. Reduces instructions size of Flutter Gallery by about 0.8%. Change-Id: Ife30850c1a23f0986f85d42c1015f4caa7cf1fa6 Cq-Do-Not-Cancel-Tryjobs: true Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153602 Commit-Queue: Aske Simon Christensen <askesc@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com>