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

Issue 13801014: Fix bug in ParallelMoveResolver::EmitSwap: implement swaps of FPU spill slots. (Closed)

Created:
7 years, 8 months ago by Vyacheslav Egorov (Google)
Modified:
7 years, 8 months ago
CC:
reviews_dartlang.org, Cutch, regis, zra
Visibility:
Public.

Description

Fix bug in ParallelMoveResolver::EmitSwap: implement swaps of FPU spill slots. Remove representation from location. Presence of representation in location encoding was violating the invariant that unequal locations must be disjoint (where equality for locations is defined in terms of bitwise equality of their encoding). This could lead ParallelMoveResolver to treat XMM1 containing unboxed double as unequal location to XMM1 containing unboxed mint, which is obviously incorrect. For similar reason eliminate kFloat32x4StackSlot and kUint32x4StackSlot distinction is eliminated and both are replaced with kQuadStackSlot. Register allocator now guarantees that no kQuadStackSlot occupies the same space as any other kDoubleStackSlot. This also shrinks optimized stack when only doubles are used (but might lead to a higher stack utilization when a mixture of doubles and quads is used). Implement allocation of scratch Cpu and Xmm registers for ParallelMoveResolver. This also allows to remove push(eax)/pop(eax) pairs when resolving memory-memory cycles on ia32. BUG=dart:9710 Committed: https://code.google.com/p/dart/source/detail?r=21148

Patch Set 1 #

Patch Set 2 : Add comments #

Total comments: 2

Patch Set 3 : Ensure that ARM/MIPS compile #

Patch Set 4 : fix typo #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+437 lines, -191 lines) Patch
M runtime/vm/constants_arm.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/constants_ia32.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/constants_mips.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/constants_x64.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/deopt_instructions.h View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/deopt_instructions.cc View 2 chunks +8 lines, -7 lines 0 comments Download
M runtime/vm/flow_graph_allocator.h View 3 chunks +9 lines, -4 lines 0 comments Download
M runtime/vm/flow_graph_allocator.cc View 1 11 chunks +64 lines, -30 lines 0 comments Download
M runtime/vm/flow_graph_compiler.h View 1 2 1 chunk +41 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_compiler.cc View 1 2 3 5 chunks +102 lines, -5 lines 0 comments Download
M runtime/vm/flow_graph_compiler_arm.cc View 1 2 5 chunks +38 lines, -12 lines 1 comment Download
M runtime/vm/flow_graph_compiler_ia32.cc View 1 2 5 chunks +61 lines, -35 lines 0 comments Download
M runtime/vm/flow_graph_compiler_mips.cc View 1 2 1 chunk +20 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_compiler_x64.cc View 1 2 5 chunks +45 lines, -9 lines 0 comments Download
M runtime/vm/intermediate_language_ia32.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M runtime/vm/intermediate_language_x64.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M runtime/vm/locations.h View 1 11 chunks +37 lines, -80 lines 0 comments Download
M runtime/vm/locations.cc View 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Vyacheslav Egorov (Google)
+johnmccutchan fyi
7 years, 8 months ago (2013-04-08 18:40:25 UTC) #1
Vyacheslav Egorov (Google)
Florian, please take a look.
7 years, 8 months ago (2013-04-08 18:40:49 UTC) #2
Florian Schneider
LGTM. https://codereview.chromium.org/13801014/diff/2001/runtime/vm/flow_graph_compiler.cc File runtime/vm/flow_graph_compiler.cc (right): https://codereview.chromium.org/13801014/diff/2001/runtime/vm/flow_graph_compiler.cc#newcode968 runtime/vm/flow_graph_compiler.cc:968: ParallelMoveResolver::ScratchFpuRegisterScope::ScratchFpuRegisterScope( Can you implement ScratchFpuRegisterScope in using ScratchRegisterScope ...
7 years, 8 months ago (2013-04-09 09:44:27 UTC) #3
Vyacheslav Egorov (Google)
Thanks for the review. I tried removing duplication but it gets too messy because there ...
7 years, 8 months ago (2013-04-09 11:16:54 UTC) #4
Vyacheslav Egorov (Google)
Florian, PTAL I made ARM/MIPS compile and shared more code between Cpu/Fpu scratch scopes. +regis, ...
7 years, 8 months ago (2013-04-09 12:06:06 UTC) #5
Florian Schneider
lgtm
7 years, 8 months ago (2013-04-09 12:12:18 UTC) #6
Vyacheslav Egorov (Google)
Committed patchset #4 manually as r21148 (presubmit successful).
7 years, 8 months ago (2013-04-09 12:24:12 UTC) #7
regis
7 years, 8 months ago (2013-04-09 15:29:27 UTC) #8
Message was sent while issue was closed.
ARM/MIPS LGTM with comments.

https://codereview.chromium.org/13801014/diff/17001/runtime/vm/flow_graph_com...
File runtime/vm/flow_graph_compiler_arm.cc (right):

https://codereview.chromium.org/13801014/diff/17001/runtime/vm/flow_graph_com...
runtime/vm/flow_graph_compiler_arm.cc:1274: ScratchRegisterScope
ensure_scratch(this, IP);
IP is not an available register, so there is no need to pass it here as blocked
register.
I noticed that some architecture independent code assumes that the range of
available registers starts with register 0, which is not the case on MIPS. That
should be easy for us to fix that.

Powered by Google App Engine
This is Rietveld 408576698