dart-sdk/runtime
Martin Kustermann d7cf6959bb [VM] Inline ClassID.getID() eagerly, extend pattern matching logic to recognize it, use it to special case ascii decoding
This change extends/fixes the exiting "pattern recognition" which tries
to recognize the pattern

  v2 <- LoadClassIdInstr(v1)
  BranchIf v2 == IntegerConstant(cid)

Furthermore we start inlining the recognized `ClassID.getID` method very
early in the pipeline.  This allows the VM to recognize the above
pattern and insert redefinitions before the actual inlining pass.

Furthermore we special-case two very hot methods in utf8 decoding by
manually having two loops, one of which is guarded by a class-id check
against the _Uint8ArrayView class, which is most common.  (In the future
we would like to unify the typed data layouts so we no longer need to
use `ClassId.getID`, thereby also allowing non core library code to use
this).

This improves dart-aot by
  * 31%+ for a protobuf decoding benchmark we care about


Issue https://github.com/dart-lang/sdk/issues/31954

Change-Id: Ia567b92b7e76ff28eda1726deaafda32732ed8f5
Reviewed-on: https://dart-review.googlesource.com/c/85281
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2018-11-27 13:14:27 +00:00
..
bin [VM] Inline ClassID.getID() eagerly, extend pattern matching logic to recognize it, use it to special case ascii decoding 2018-11-27 13:14:27 +00:00
docs [VM] Add @pragma("vm:non-nullable-result-type") annotation 2018-11-22 16:18:27 +00:00
include Remove kernel isolate API from the public dart_api.h 2018-11-26 22:47:20 +00:00
lib [VM] Inline ClassID.getID() eagerly, extend pattern matching logic to recognize it, use it to special case ascii decoding 2018-11-27 13:14:27 +00:00
observatory [VM] Fix flow graph builder to not generate different code in unoptimized/optimized mode 2018-11-22 14:05:47 +00:00
platform [vm, kbc, dbc] Remove dependency on computed goto. 2018-11-26 18:20:27 +00:00
tests/vm [test] Further debugging for appjit_determinism_test. 2018-11-26 22:18:05 +00:00
third_party [gn] Split target arch/os defines from dart_config 2017-10-31 17:33:13 +00:00
tools [dart/fuzzer] Disable jit-opt modes 2018-11-19 22:56:33 +00:00
vm [VM] Inline ClassID.getID() eagerly, extend pattern matching logic to recognize it, use it to special case ascii decoding 2018-11-27 13:14:27 +00:00
.gitignore
BUILD.gn [fuchsia] Fixes for the Fuchsia build 2018-11-26 16:30:33 +00:00
codereview.settings
configs.gni [build] Remove unused configurations (dead since removal of dart_bootstrap). 2018-11-16 01:14:56 +00:00
CPPLINT.cfg
PRESUBMIT.py
runtime_args.gni [vm] Eliminate dart_zlib_path from BUILD files 2018-10-24 18:06:43 +00:00