Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bridge all differences being seen in optimized JIT between the AST based version and the bytecode based version #36429

Closed
a-siva opened this issue Apr 2, 2019 · 5 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. customer-fuchsia

Comments

@a-siva
Copy link
Contributor

a-siva commented Apr 2, 2019

Currently we are seeing a diference in behaviour between the AST based optimizing JIT and the bytecode based optimizing JIT. These differences need to be investigated and fixed.

@a-siva a-siva added area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. customer-fuchsia labels Apr 2, 2019
@a-siva
Copy link
Contributor Author

a-siva commented Apr 2, 2019

/cc @alexmarkov this is the tracking issue for the work you are doing towards figuring out the differences.

@alexmarkov
Copy link
Contributor

Related issue: #36342

@alexmarkov alexmarkov self-assigned this Apr 2, 2019
dart-bot pushed a commit that referenced this issue Apr 3, 2019
Issue: #36429
Change-Id: I47e189bff4e9998123c06afa2e5b0d1c79d74566
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98608
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
dart-bot pushed a commit that referenced this issue Apr 5, 2019
AllocateClosure bytecode is used to convey information about closure
function into an instance allocation site. This allows VM inliner to see
closure function very early at the optimization pipeline and enables
inlining of closure calls.

DeltaBlueClosures in JIT/bytecode mode (--use-bytecode-compiler):
Before: DeltaBlueClosures(RunTime): 1746.5404424083767 us.
After: DeltaBlueClosures(RunTime): 1291.4649496449324 us.

Issue: #36342
Issue: #36429
Issue: #36428
Change-Id: I6e94cdc2eb30110b0651a86bd2bdc40dcdd63207
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98439
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
dart-bot pushed a commit that referenced this issue Apr 10, 2019
dart --use-bytecode-compiler NavierStokes.dart
Before: NavierStokes(RunTime): 8909.053017777778 us.
After: NavierStokes(RunTime): 7221.510314079423 us.

Issue: #36429
Issue: #36428

Change-Id: Ib1be4dd20cdc25e3b979a91a098f67a7bc00df8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98945
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
dart-bot pushed a commit that referenced this issue May 6, 2019
'is' checks which are represented as _simpleInstanceOf() calls
are sometimes recognized by Token::kIS and not by a target of a call.

Before: TypeChecks.IsCheck(RunTime): 279.63057234726693 us.
After: TypeChecks.IsCheck(RunTime): 200.77956524794217 us.
(best of 5 runs)

Issue: #36429
Change-Id: I5a22222c59c33d2fa8262383a597c2c013ab61b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101322
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
dart-bot pushed a commit that referenced this issue May 6, 2019
…esponds to fallthrough

Forward jumps in bytecode usually go to the 'else' part (skipping 'then')
or exit loops. In order to generate Branch instructions in flow graph
which would represent ifs and loop conditions more naturally the first ('true')
successor of a BranchInstr should correspond to fallthrough in bytecode, and not the
target of a Jump bytecode instructions.

This results in a slightly better register allocation.

Golem shows overall improvement +0.4620% on x64 and +0.8395% on arm64.

Issue: #36429
Change-Id: I1ea581ef9f5998eb960914680d0e867c57639f1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101361
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
@alexmarkov
Copy link
Contributor

Summary on several outstanding benchmarks:

dart-bot pushed a commit that referenced this issue May 8, 2019
Before: BuildTableBuffer(RunTime): 10.759671901226596 us.
After: BuildTableBuffer(RunTime): 9.78219236600898 us.
(--enable-interpreter, best of 5 runs)

Issue: #36429
Issue: #36342
Change-Id: If645fb6767a35e39ff1a75fcf91d0a03c3b16987
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101720
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
dart-bot pushed a commit that referenced this issue Jul 20, 2019
DeltaBlueClosures +26.54%

Closes #36889
Issue: #36429

Change-Id: I8920c7985366a2c955a06013aa9f58763fcbced9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109580
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
dart-bot pushed a commit that referenced this issue Jul 22, 2019
… calls

Sudoku +15.62%

Issue: #36429
Change-Id: I58cde03ffc9788b2eebe889fcc1a98a82698c39a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109887
Reviewed-by: Aart Bik <ajcbik@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
dart-bot pushed a commit that referenced this issue Jul 26, 2019
TypeChecks.CovariantCheck +9.571%

Issue: #36429
Change-Id: Ib8ae0160e47d309e9f98b9ba5981c5be77c583d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110680
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
dart-bot pushed a commit that referenced this issue Jul 30, 2019
Issue: #36429
Change-Id: I9d6b209529394aebe8ba64bf1c06cee72e7082b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111200
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
dart-bot pushed a commit that referenced this issue Aug 3, 2019
MicroClosureCreateTearoffClassSecondTime(RunTime) 3922 us -> 2030 us.

Issue: #36429
Change-Id: I3a6f93950a469969d82243fd1744d5a4f7fb1e78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111868
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
dart-bot pushed a commit that referenced this issue Aug 6, 2019
… flow graph builder

ia32/TypedData.Int8ListBench(RunTime): 22.8us -> 14.9us

Issue: #36429
Change-Id: Ib9e68df107c9bbc97c3d75fb13728efb77615c6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112029
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
dart-bot pushed a commit that referenced this issue Sep 5, 2019
BinaryTrees(RunTime): 72191.33325 us. -> 68058.06103333333 us.
(linux/x64, bytecode compiler enabled)

Issue: #36429

Change-Id: Ie5344d874f6b4afc5e8b6516fc6283d83963f17f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115601
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
@alexmarkov
Copy link
Contributor

Bytecode mode is removed from Dart VM.

tekknolagi pushed a commit to tekknolagi/dart-assembler that referenced this issue Nov 3, 2020
dart --use-bytecode-compiler NavierStokes.dart
Before: NavierStokes(RunTime): 8909.053017777778 us.
After: NavierStokes(RunTime): 7221.510314079423 us.

Issue: dart-lang#36429
Issue: dart-lang#36428

Change-Id: Ib1be4dd20cdc25e3b979a91a098f67a7bc00df8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98945
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
tekknolagi pushed a commit to tekknolagi/dart-assembler that referenced this issue Nov 3, 2020
MicroClosureCreateTearoffClassSecondTime(RunTime) 3922 us -> 2030 us.

Issue: dart-lang#36429
Change-Id: I3a6f93950a469969d82243fd1744d5a4f7fb1e78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111868
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
@doodlewind
Copy link

Bytecode mode is removed from Dart VM.

@alexmarkov Do you mean the Dart Bytecode Interpreter is removed? If so, how does Flutter running its iOS debug mode then? I'm trying to make a minimal Dart VM build on iOS, but no guide or build args can be found. I'd appreciate any tips, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. customer-fuchsia
Projects
None yet
Development

No branches or pull requests

3 participants