Commit Graph

17 Commits

Author SHA1 Message Date
Alexander Markov dea3fa7b8c [vm/compiler] Allocation sinking of arrays and typed data objects
JIT mode: ParticleSystemUpdate +44-52%
JIT mode with null safety: ParticleSystemUpdate +40-44%

In AOT mode a few methods from package:vector_math are not inlined
in ParticleSystemUpdate benchmarks, which prevents allocation
sinking optimization.

Closes https://github.com/dart-lang/sdk/issues/43228

Change-Id: I28d5816e643e4cfffe4b4fb7db5db5a3aa72499c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164805
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-10-16 20:05:02 +00:00
Ryan Macnak 6fe15f6df9 [vm] Represent tagged pointers as C++ value types instead of C++ pointer types.
This works around bugs in UndefinedBehaviorSanitizer and Clang.

Bug: b/28638298
Change-Id: I6be595f9664516019d28017d24559583a1ae3a21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144354
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2020-04-25 05:21:27 +00:00
Samir Jindel c885bdde1d [vm] DBC is obsolete. Remove dead code.
Change-Id: Ica33af158cca53c8e951e4b2582de83660e8a60d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121851
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-10-27 18:18:29 +00:00
Zachary Anderson 6cd8a79078 VM: Re-format to use at most one newline between functions
R=asiva@google.com

Review-Url: https://codereview.chromium.org/2974233002 .
2017-07-13 08:08:37 -07:00
Zachary Anderson a1bcf051d8 clang-format runtime/vm
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2481873005 .
2016-11-08 13:54:47 -08:00
Zachary Anderson 103881d01c Make header include guards great again
i.e. #ifndef VM_WHATEVER -> #ifndef RUNTIME_VM_WHATEVER

This lets us remove a hack from the PRESUBMIT.py script that existed
for reasons that are no longer valid, and sets us up to add some
presubmit checks for the GN build.

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

Review URL: https://codereview.chromium.org/2450713004 .
2016-10-26 00:26:03 -07:00
Zachary Anderson db26281172 DBC: CheckClassInstr
R=vegorov@google.com

Review URL: https://codereview.chromium.org/2098573004 .
2016-06-29 15:25:43 -07:00
fschneider@google.com 9709db7f76 VM: Add infrastructure to support deferred generation of unoptimized code.
Add deferred deoptimization instructions for return address, pc marker and
object pool pointer. This enables generating unoptimized code lazily
on deoptimization.

This CL does not change the way unoptimized code is generated or collected
yet, but just provides the mechanisms needed. This can be used to allow
code GC for the unoptimized code of optimized functions.

R=iposva@google.com

Review URL: https://codereview.chromium.org//1052563003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44934 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-07 12:32:22 +00:00
fschneider@google.com b26ff22adf Allocation sinking for contexts.
Improved aliasing computation in presence of Redefinition and AssertAssignable.

Added possibility for inlining annotations via --enable-inlining-annotations flag.

R=vegorov@google.com

Review URL: https://codereview.chromium.org//184523002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41713 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-13 13:53:58 +00:00
vegorov@google.com 77c26187f2 Support allocation sinking for compound objects.
- Improve escape/alias analysis:
-- Storing an object into a field of another object does not mean that this object escapes (or has aliases) as long as that object does not have any loads from the same place;
-- Places like X.f and Y.f don't alias if X and Y are two different allocation instructions even if X and Y themselves potentially have aliases;
-- Improve precision of alias analysis for indexed properties;

- Support dematerialization and rematerialization of objects that are referenced by other dematerialized objects.
-- Use fix-point algorithm to collect candidates for allocation sinking;
-- Support aborting unsuccessful allocation sinking.

R=fschneider@google.com, johnmccutchan@google.com

Review URL: https://codereview.chromium.org//395943003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38404 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-18 18:35:08 +00:00
fschneider@google.com 1fbec40a7f Change deoptimization description for materialized objects.
Use field offset instead of fields as arguments in the deoptimization
instructions for materialization of objects. This is to prepare for
materializing contexts and fixed-size arrays when doing allocation sinking.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//183683013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33267 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-04 11:53:16 +00:00
johnmccutchan@google.com ed5894d0cf Unbox/Box Float64x2 and inline typed array loads and stores
R=fschneider@google.com

Review URL: https://codereview.chromium.org//172653002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32869 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-20 20:41:54 +00:00
fschneider@google.com 15dfa97ab6 Fix bug and refactor optimized try-catch.
When untagged values flow into a exception-throwing instruction
 they need to be converted eagerly. Catch block entries assume all
 values are tagged at the entry.

 I changed the generation of moves at throwing
 instructions in try-catch: Instead of manuallu emitting moves,
 construct a parallel move and use the resolver to emit the native code.
 This eliminates a lot of duplicated code from all platforms.

 It will also allow to re-use stack space that is currently allocated
 separately for each individual try-catch in a function.

 I added a few more unrelated minor changes in various parts of the VM
 * Simpilify guard code generation
 * Resolve refactoring TODO in deoptimization
 * Improve names

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//125103002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31536 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-07 09:58:45 +00:00
fschneider@google.com e994d8b697 Revert r31326.
TBR=johnmccutchan@google.com,

Review URL: https://codereview.chromium.org//118133004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31332 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-20 12:21:09 +00:00
fschneider@google.com fe726e1971 Use parallel move resolver for optimized try-catch.
This CL has no change in functionality and is purely clean up and
refactoring. Instead of manually generating the moves at throwing
instructions in try-catch, construct a parallel move and use the resolver
to emit the native code. This eliminates a lot of duplicated code
from all platforms.

It will also allow to re-use stack space that is currently allocated
separately for each individual try-catch in a function.

I added a few more unrelated minor changes in various parts of the VM
* Simpilify guard code generation
* Resolve refactoring TODO in deoptimization
* Improve names

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org//119213002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31326 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-20 09:41:42 +00:00
johnmccutchan@google.com 29c01044bc This is the final breaking change in dart:typed_data needed for Dart 1.0. We need this change because the ECMAScript SIMD specification only includes Int32x4 and Int32x4List and our types must match.
R=srdjan@google.com

Review URL: https://codereview.chromium.org//56023004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29849 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-04 21:56:59 +00:00
turnidge@google.com baeb23f9a5 Refactor some deoptimization code.
Primarily this change moves deoptimization state/code out of Isolate
and into DeoptContext (formerly DeoptimizationContext).  The lifetime
of DeoptizationContext changes to survive through the entire
deoptimization process.

Some minor renaming.  DeoptizationContext -> DeoptContext to make it
consistent with DeoptInstr and to save my wrists.

New files deferred_object.{cc,h} contain a bunch of the stuff lifted
from isolate.{cc,h}.

R=fschneider@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org//24834002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28112 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 19:34:12 +00:00