dart-sdk/runtime/vm/compiler
Martin Kustermann a44d1eefe6 [vm/compiler] Allow lazy deopts to continue in unoptimized code at beginning of IR instruction
If an IR instruction lazy-deopts it usually continues in unoptimized
code in the same IR instruction after-call.

Though in certain situations we want to continue before-call in
unoptimized code.

Two cases relevant in this CL:

  * An instruction gets LICMed: If it lazy-deopts it will continue
    at the Goto instruction outside the loop.

  * A recognized method which got it's InstanceCall replaced by several
    IR instructions. If any of them (except the last one) lazy-deopts
    it should re-try the call in unoptimized code (e.g. []=)

In order to faciliate this we add a bit to the [Environment] which
encodes whether the continuation point in unoptimized code is
before-call - if so, we issue corresponding metadata.

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

TEST=runtime/tests/vm/dart{,_2}/regress_46070_test.dart

Change-Id: Ib824081768a2fd6293751a8fe09753e0d8155c87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200644
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2021-06-01 12:59:23 +00:00
..
aot [vm, compiler] Remove compaction of canonical type tables from precompiler. 2021-05-20 18:43:05 +00:00
api [vm] Add feature to connect AOT code to code comments via .debug_line 2021-02-02 11:35:00 +00:00
assembler [vm/compiler] Avoid TTS running into instruction encoding limits 2021-05-18 07:19:53 +00:00
backend [vm/compiler] Allow lazy deopts to continue in unoptimized code at beginning of IR instruction 2021-06-01 12:59:23 +00:00
ffi [vm/ffi] Fix ia32 struct by value return with no arguments 2021-05-26 13:37:32 +00:00
frontend [vm] Replace KernelConstantsMap with array 2021-05-26 09:41:42 +00:00
jit [vm/compiler] Add --print-precompiler-timings 2021-05-11 11:15:53 +00:00
asm_intrinsifier.cc [vm/compiler] Add check to prevent inclusion of compiler headers into AOT runtime 2020-04-17 13:11:08 +00:00
asm_intrinsifier.h [vm/compiler] Verify that intrinsic parameters are boxed 2020-10-21 15:50:13 +00:00
asm_intrinsifier_arm.cc [vm] Share BoxAllocationSlowPath across architectures and use BoxABI::kResultReg 2021-05-10 12:08:49 +00:00
asm_intrinsifier_arm64.cc [vm, compiler] Account for garbage in the upper half of compressed Smis in Bigint intrinsics. 2021-05-14 21:22:38 +00:00
asm_intrinsifier_ia32.cc [vm] Fix race when setting identity hash codes. 2021-05-03 11:47:08 +00:00
asm_intrinsifier_x64.cc [vm, compiler] Account for garbage in the upper half of compressed Smis in Bigint intrinsics. 2021-05-14 21:22:38 +00:00
call_specializer.cc [vm/aot] Remove heuristic selection of checked Smi operations 2021-03-25 19:18:47 +00:00
call_specializer.h [vm/concurrency] Move background compiler related state from Isolate to IsolateGroup 2021-02-12 03:40:14 +00:00
cha.cc [vm] Make naming more consistent when converting between handles, tagged and untagged pointers. 2021-01-15 23:32:02 +00:00
cha.h [vm/compiler] Add check to prevent inclusion of compiler headers into AOT runtime 2020-04-17 13:11:08 +00:00
cha_test.cc [vm/concurrency] Change references to class_table/object_store/heap from Isolate to IsolateGroup 2021-01-06 15:22:11 +00:00
compiler_pass.cc [vm/compiler] Add --print-precompiler-timings 2021-05-11 11:15:53 +00:00
compiler_pass.h [vm/compiler] Add --print-precompiler-timings 2021-05-11 11:15:53 +00:00
compiler_sources.gni [vm/compiler] Add --print-precompiler-timings 2021-05-11 11:15:53 +00:00
compiler_state.cc [vm/concurrency] Move obfuscation related state from Isolate to IsolateGroup 2021-01-06 11:12:40 +00:00
compiler_state.h [vm/compiler] Add --print-precompiler-timings 2021-05-11 11:15:53 +00:00
compiler_timings.cc [vm/compiler] Add --print-precompiler-timings 2021-05-11 11:15:53 +00:00
compiler_timings.h [vm/compiler] Add --print-precompiler-timings 2021-05-11 11:15:53 +00:00
graph_intrinsifier.cc Revert "[vm, compiler] Support unboxed parameters for integer intrinsics." 2021-04-13 17:05:47 +00:00
graph_intrinsifier.h [vm/compiler] Graph intrinsify implicit getters/setters in common cases. 2020-07-29 14:49:45 +00:00
graph_intrinsifier_arm.cc [vm/compiler] Track LR state in ARM/ARM64 backends 2020-12-10 15:51:27 +00:00
graph_intrinsifier_arm64.cc [vm/compiler] Track LR state in ARM/ARM64 backends 2020-12-10 15:51:27 +00:00
graph_intrinsifier_ia32.cc [vm/compiler] Add check to prevent inclusion of compiler headers into AOT runtime 2020-04-17 13:11:08 +00:00
graph_intrinsifier_x64.cc [vm/ffi] Fix LR clobber in JumpToFrame stub on ARM 2020-11-27 09:11:49 +00:00
intrinsifier.cc [vm] Fix race when setting identity hash codes. 2021-05-03 11:47:08 +00:00
intrinsifier.h [vm/compiler] Graph intrinsify implicit getters/setters in common cases. 2020-07-29 14:49:45 +00:00
method_recognizer.cc [vm] Support unsigned shift operator int.>>> 2021-02-24 00:14:57 +00:00
method_recognizer.h [vm] Require all recognized methods to be marked with pragma. 2020-11-16 13:49:50 +00:00
offsets_extractor.cc [vm/compiler] Cache entry point in closure in bare instructions mode. 2021-05-20 09:05:40 +00:00
README.md
recognized_methods_list.h [VM/FFI] Adds FFI leaf calls. 2021-05-21 11:12:02 +00:00
relocation.cc [vm/compiler] Improve precision of AOT code relocator 2021-04-29 15:12:15 +00:00
relocation.h [vm/compiler] Improve precision of AOT code relocator 2021-04-29 15:12:15 +00:00
relocation_test.cc [vm/concurrency] Distinguish "gc safepoint operations" from "deopt safepoint operations" 2021-05-10 09:13:09 +00:00
runtime_api.cc [vm/compiler] Cache entry point in closure in bare instructions mode. 2021-05-20 09:05:40 +00:00
runtime_api.h [VM/runtime] Use signature instead of function in type test cache for closure. 2021-05-20 23:46:45 +00:00
runtime_offsets_extracted.h [VM/FFI] Adds FFI leaf calls. 2021-05-21 11:12:02 +00:00
runtime_offsets_list.h [VM/runtime] Use signature instead of function in type test cache for closure. 2021-05-20 23:46:45 +00:00
stub_code_compiler.cc [vm/compiler] Cache entry point in closure in bare instructions mode. 2021-05-20 09:05:40 +00:00
stub_code_compiler.h [vm/compiler] Use isolate version of AllocateContext stub. 2021-05-21 07:35:50 +00:00
stub_code_compiler_arm.cc [vm/compiler] Create AllocateObjectABI struct in constants. 2021-05-26 09:39:22 +00:00
stub_code_compiler_arm64.cc [vm/compiler] Create AllocateObjectABI struct in constants. 2021-05-26 09:39:22 +00:00
stub_code_compiler_ia32.cc [vm/compiler] Create AllocateObjectABI struct in constants. 2021-05-26 09:39:22 +00:00
stub_code_compiler_x64.cc [vm/compiler] Create AllocateObjectABI struct in constants. 2021-05-26 09:39:22 +00:00
type_testing_stubs_arm.cc [vm] Defer object pools and object pool entries. 2021-03-04 23:19:30 +00:00
type_testing_stubs_arm64.cc [vm] Defer object pools and object pool entries. 2021-03-04 23:19:30 +00:00
type_testing_stubs_x64.cc [vm] Defer object pools and object pool entries. 2021-03-04 23:19:30 +00:00
write_barrier_elimination.cc [vm] Standardize hashing instance methods in C++. 2021-04-14 10:04:48 +00:00
write_barrier_elimination.h [vm/compiler] Add check to prevent inclusion of compiler headers into AOT runtime 2020-04-17 13:11:08 +00:00
write_barrier_elimination_test.cc [VM Unit Tests] Fix some of the VM unit tests to account for new null safety semantics 2020-10-26 21:13:36 +00:00

Dart VM Compilation Pipeline

This folder contains Dart VM compilation pipeline.

Compilation pipeline is mainly responsible for converting AST or Kernel AST into IL flow graphs and then generating native code from IL.

It has the following structure:

Directory What goes there
assembler/ Assemblers and disassemblers
backend/ IL based compilation backend: optimization passes and architecture specific code generation rules
frontend/ Frontends responsible for converting AST into IL
jit/ JIT specific passes and compilation pipeline entry points
aot/ AOT specific passes and compilation pipeline entry points
. Shared code or code without clear designation.

Currently there are no layering restrictions and components from different subfolders can reference each other.