Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(158)

Issue 2226893002: Optimize AOT's switchable calls for the monomorphic case. (Closed)

Created:
4 years, 4 months ago by rmacnak
Modified:
4 years, 4 months ago
Reviewers:
Florian Schneider
CC:
reviews_dartlang.org, turnidge, Cutch, vm-dev_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Optimize AOT's switchable calls for the monomorphic case. The call sequence is very similar to a classic IC call, except the guarded class and the target are loaded indirectly from the constant pool instead of as immediates. In the monomorphic case, we call directly to the expected target with a class check in the callee. In the unlinked, polymorphic and megamorphic cases, we call a stub; these case are now call-through instead of call-and-return. Every code, except stubs involved in switchable calls, includes the class check sequence at the beginning. So we now distinguish between a checked and an unchecked entry point. Generated code except the switchable call continues to use the unchecked entry point. PC offsets are calculated relative to the beginning of the instruction stream, rather than either entry point. BUG= R=fschneider@google.com Committed: https://github.com/dart-lang/sdk/commit/7ff2dd4117f076adb09d3330be3afd1355eada8b

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Patch Set 4 : . #

Patch Set 5 : kinda x64 #

Patch Set 6 : . #

Patch Set 7 : . #

Patch Set 8 : . #

Patch Set 9 : . #

Total comments: 14

Patch Set 10 : . #

Patch Set 11 : review comments #

Patch Set 12 : sync #

Unified diffs Side-by-side diffs Delta from patch set Stats (+949 lines, -354 lines) Patch
M runtime/lib/stacktrace.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/assembler.h View 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/assembler_arm.h View 1 2 chunks +6 lines, -1 line 0 comments Download
M runtime/vm/assembler_arm.cc View 1 2 3 4 5 6 7 8 9 1 chunk +38 lines, -0 lines 0 comments Download
M runtime/vm/assembler_arm64.h View 1 2 3 4 5 2 chunks +3 lines, -1 line 0 comments Download
M runtime/vm/assembler_arm64.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +48 lines, -0 lines 0 comments Download
M runtime/vm/assembler_mips.h View 1 2 3 4 5 3 chunks +6 lines, -2 lines 0 comments Download
M runtime/vm/assembler_mips.cc View 1 2 3 4 5 6 7 8 9 1 chunk +34 lines, -0 lines 0 comments Download
M runtime/vm/assembler_x64.h View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M runtime/vm/assembler_x64.cc View 1 2 3 4 5 6 7 8 9 2 chunks +40 lines, -0 lines 0 comments Download
M runtime/vm/assembler_x64_test.cc View 1 2 3 4 6 chunks +15 lines, -5 lines 0 comments Download
M runtime/vm/clustered_snapshot.cc View 1 2 3 4 5 2 chunks +4 lines, -3 lines 0 comments Download
M runtime/vm/code_generator.cc View 1 2 3 4 5 6 7 8 9 10 8 chunks +130 lines, -19 lines 0 comments Download
M runtime/vm/code_patcher.h View 1 chunk +7 lines, -4 lines 0 comments Download
M runtime/vm/code_patcher_arm.cc View 1 1 chunk +23 lines, -9 lines 0 comments Download
M runtime/vm/code_patcher_arm64.cc View 1 chunk +23 lines, -9 lines 0 comments Download
M runtime/vm/code_patcher_arm64_test.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/code_patcher_arm_test.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/code_patcher_dbc.cc View 1 2 3 4 5 1 chunk +23 lines, -9 lines 0 comments Download
M runtime/vm/code_patcher_ia32.cc View 1 2 chunks +20 lines, -5 lines 0 comments Download
M runtime/vm/code_patcher_mips.cc View 1 2 3 1 chunk +23 lines, -9 lines 0 comments Download
M runtime/vm/code_patcher_mips_test.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/code_patcher_x64.cc View 1 2 3 4 5 6 7 3 chunks +44 lines, -26 lines 0 comments Download
M runtime/vm/compiler.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/debugger.cc View 4 chunks +5 lines, -5 lines 0 comments Download
M runtime/vm/debugger_dbc.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/vm/debugger_ia32.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/vm/disassembler.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/vm/disassembler_ia32.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/exceptions.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/find_code_object_test.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M runtime/vm/flow_graph_compiler.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M runtime/vm/flow_graph_compiler_arm.cc View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -5 lines 0 comments Download
M runtime/vm/flow_graph_compiler_arm64.cc View 1 2 3 4 5 6 7 8 2 chunks +8 lines, -5 lines 0 comments Download
M runtime/vm/flow_graph_compiler_ia32.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/flow_graph_compiler_mips.cc View 1 2 3 4 5 6 7 8 2 chunks +8 lines, -5 lines 0 comments Download
M runtime/vm/flow_graph_compiler_x64.cc View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -4 lines 0 comments Download
M runtime/vm/instructions_arm.h View 1 1 chunk +11 lines, -9 lines 0 comments Download
M runtime/vm/instructions_arm.cc View 1 1 chunk +20 lines, -15 lines 0 comments Download
M runtime/vm/instructions_arm64.h View 1 1 chunk +11 lines, -9 lines 0 comments Download
M runtime/vm/instructions_arm64.cc View 1 2 3 4 5 1 chunk +20 lines, -15 lines 0 comments Download
M runtime/vm/instructions_arm64_test.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M runtime/vm/instructions_arm_test.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/instructions_dbc.h View 1 2 3 4 5 1 chunk +11 lines, -6 lines 0 comments Download
M runtime/vm/instructions_dbc.cc View 1 2 3 4 5 1 chunk +15 lines, -10 lines 0 comments Download
M runtime/vm/instructions_mips.h View 1 2 3 1 chunk +11 lines, -9 lines 0 comments Download
M runtime/vm/instructions_mips.cc View 1 2 3 4 5 6 7 8 9 1 chunk +20 lines, -15 lines 0 comments Download
M runtime/vm/instructions_mips_test.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/object.h View 1 2 3 4 5 6 7 8 9 10 5 chunks +52 lines, -8 lines 0 comments Download
M runtime/vm/object.cc View 16 chunks +24 lines, -23 lines 0 comments Download
M runtime/vm/object_reload.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/object_service.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M runtime/vm/object_test.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -4 lines 0 comments Download
M runtime/vm/precompiler.cc View 1 2 3 4 5 3 chunks +4 lines, -3 lines 0 comments Download
M runtime/vm/profiler.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +7 lines, -7 lines 0 comments Download
M runtime/vm/profiler.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +11 lines, -11 lines 0 comments Download
M runtime/vm/profiler_service.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M runtime/vm/profiler_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/raw_object.h View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/runtime_entry_list.h View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/service_test.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/simulator_arm.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/simulator_arm64.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/simulator_mips.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/snapshot.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/stack_frame.cc View 4 chunks +5 lines, -6 lines 0 comments Download
M runtime/vm/stub_code.h View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -0 lines 0 comments Download
M runtime/vm/stub_code.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -2 lines 0 comments Download
M runtime/vm/stub_code_arm.cc View 1 2 3 4 5 6 7 8 9 5 chunks +32 lines, -7 lines 0 comments Download
M runtime/vm/stub_code_arm64.cc View 1 2 3 4 5 6 7 8 9 5 chunks +32 lines, -7 lines 0 comments Download
M runtime/vm/stub_code_ia32.cc View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -1 line 0 comments Download
M runtime/vm/stub_code_mips.cc View 1 2 3 4 5 6 7 8 9 5 chunks +32 lines, -8 lines 0 comments Download
M runtime/vm/stub_code_x64.cc View 1 2 3 4 5 6 7 8 9 5 chunks +32 lines, -8 lines 0 comments Download
M runtime/vm/thread.h View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -2 lines 0 comments Download
M runtime/vm/unit_test.h View 1 chunk +2 lines, -1 line 0 comments Download
M runtime/vm/unit_test.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 10 (5 generated)
rmacnak
4 years, 4 months ago (2016-08-09 23:29:01 UTC) #5
Florian Schneider
LGTM https://codereview.chromium.org/2226893002/diff/150001/runtime/vm/code_generator.cc File runtime/vm/code_generator.cc (right): https://codereview.chromium.org/2226893002/diff/150001/runtime/vm/code_generator.cc#newcode1046 runtime/vm/code_generator.cc:1046: Smi& old_guarded_cid = Smi::Handle(zone); To avoid overlapping terminology, ...
4 years, 4 months ago (2016-08-10 02:32:14 UTC) #6
rmacnak
X64: Don't use LoadClassIdMayBeSmi, which destroys the object register if it is smi All: Don't ...
4 years, 4 months ago (2016-08-11 00:17:49 UTC) #7
rmacnak
https://codereview.chromium.org/2226893002/diff/150001/runtime/vm/precompiler.cc File runtime/vm/precompiler.cc (right): https://codereview.chromium.org/2226893002/diff/150001/runtime/vm/precompiler.cc#newcode1939 runtime/vm/precompiler.cc:1939: if (ic_.NumArgsTested() != 1) continue; On 2016/08/10 02:32:14, Florian ...
4 years, 4 months ago (2016-08-11 00:19:13 UTC) #8
rmacnak
4 years, 4 months ago (2016-08-12 18:18:42 UTC) #10
Message was sent while issue was closed.
Committed patchset #12 (id:210001) manually as
7ff2dd4117f076adb09d3330be3afd1355eada8b.

Powered by Google App Engine
This is Rietveld 408576698