Commit Graph

6 Commits

Author SHA1 Message Date
Alexander Markov 4f3293c70e [vm/compiler] Recognize List.filled factory
Recognized factories have known result type and its type arguments
and length are automatically forwarded (length is forwarded only for
fixed-size lists).

List.filled factory is recognized only if optional 'growable' parameter
is not passed.

Fixes https://github.com/dart-lang/sdk/issues/42019

Change-Id: I0d63428f1c4667f3981447a939dbef67170e542e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149385
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-05-29 03:12:48 +00:00
Ben Konyi c4b7097e97 [ VM ] Migrate VM tests to support null safety and return errors from Dart_GetType and Dart_NewListOf when --null-safety is enabled
These methods return legacy types, which aren't valid with null safety
enabled.

Fixes https://github.com/dart-lang/sdk/issues/41154

Change-Id: I1181f0f3b9a8df156dea4dc4c82fef8afdf97ab9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148685
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-05-26 22:40:52 +00:00
Aart Bik 29ff784ecb [dart/compiler] Loop analysis and BCE improvements
Rationale:
Loop analysis did not take outer indices used as bounds
(triangular loops) into account to enhance analysis. This
left some obvious BCE optimizations on the table (mainly AOT).

Observed improvements (performance and code size):

About 5-15% performance on golem benchmarks:
   mainly armv7, and TypedData*Bench

Minor overall code size reduction on flutter gallery (arm32,arm64)

Comparing ./orig32.json (old) to ./new32.json (new)
Old   : 6614912 bytes.
New   : 6600336 bytes.
Change: -14576 bytes.

Comparing ./orig64.json (old) to ./new64.json (new)
Old   : 6459216 bytes.
New   : 6458736 bytes.
Change: -480 bytes.

Similar on velocity_tracker_bench (arm32,arm64)

Comparing orig32.json (old) to new32.json (new)
Old   : 804280 bytes.
New   : 794552 bytes.
Change: -9728 bytes.

Comparing orig64.json (old) to new64.json (new)
Old   : 705520 bytes.
New   : 705312 bytes.
Change: -208 bytes.

Change-Id: Ifc3b3a378ae6fd98743c48944a86a9e90ce4da5c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117200
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-11-18 19:51:13 +00:00
Ryan Macnak 71ecb73a2b [vm] Fix one MSAN failure; add UBSAN configuration.
Change-Id: I5b1d43836f3eb09983195fc3792f369aa3f8079f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120750
Reviewed-by: Chinmay Garde <chinmaygarde@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-10-09 23:38:30 +00:00
Aart Bik 2ea18498e9 [vm/compiler] Improve range analysis over MOD
Rationale:
Improves range analysis over MOD with the goal
of removing more bounds checks in a[i % length]
array accesses.

https://github.com/dart-lang/sdk/issues/37789

Change-Id: I1fb275d53a00400e2343628295fa010ac9b21786
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112933
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2019-08-14 17:44:09 +00:00
Aart Bik a9f6e0302b [vm/compiler] Unify IsRedundant for JIT/AOT bounds checks
Rationale:
The range analysis carefully computes ranges on Smis such
that the results are valid for both JIT and AOT. So the
IsRedundant() tests between the speculative and non-speculative
bounds checks can be shared. This does not only reduce the
amount of code, but also improves actual bounds check elimination.

https://github.com/dart-lang/sdk/issues/37687

Change-Id: I883a16d4be4d3704cad3e42264e1f36a5afc3b89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112167
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-08-12 18:15:16 +00:00