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

Issue 252333002: Use GPRs for mints (Closed)

Created:
6 years, 8 months ago by Cutch
Modified:
6 years, 7 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Use GPRs for mints. Changes: * Register allocator now allocates GPRs for kUnboxedMint. * Register allocator supports for SameAsFirstInput for register pairs. * Register allocator properly handles register pairs in environment uses and materialization uses. * BoxInteger updated on IA32/ARM. * UnboxInteger updated on IA32/ARM. * BinaryMintOp updated on IA32/ARM. * ShiftMintOp updated on IA32/ARM. * UnaryMintOp updated on IA32/ARM. * RelationalOp updated on IA32/ARM. * EqualityCompare updated on IA32/ARM. * LoadIndexed and StoreIndexed updated on IA32/ARM. * New Deopt instructions added. * Update live_registers when an instruction has a fixed register input and a call on the slow path. * Improve printing of register pairs in flow graph. * Do not assume live registers in slow paths contain tagged values. * LiveRange pairs for kUnboxedMint definitions marked as kUntagged representation (reduces stack usage). * Live register spilling on ARM uses same register order as stack map encoding. * Spill slots containing tagged and untagged are segregated. * Print stack maps when printing live ranges with safe points. * Print allocated spill slot when printing live ranges. Status: * IA32 completed. All tests are passing. * ARM completed. All tests passing. R=fschneider@google.com, srdjan@google.com, zra@google.com Committed: https://code.google.com/p/dart/source/detail?r=36468

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : #

Total comments: 16

Patch Set 13 : #

Patch Set 14 : #

Total comments: 20

Patch Set 15 : #

Patch Set 16 : #

Patch Set 17 : #

Patch Set 18 : #

Total comments: 10

Patch Set 19 : #

Total comments: 5

Patch Set 20 : #

Total comments: 9
Unified diffs Side-by-side diffs Delta from patch set Stats (+1031 lines, -454 lines) Patch
M runtime/vm/assembler_arm.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +7 lines, -0 lines 1 comment Download
M runtime/vm/assembler_arm.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +17 lines, -0 lines 0 comments Download
M runtime/vm/assembler_arm_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +34 lines, -0 lines 0 comments Download
M runtime/vm/bitmap.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/bitmap.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +11 lines, -0 lines 0 comments Download
M runtime/vm/deopt_instructions.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +11 lines, -1 line 5 comments Download
M runtime/vm/deopt_instructions.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 8 chunks +238 lines, -14 lines 0 comments Download
M runtime/vm/flow_graph_allocator.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +8 lines, -1 line 0 comments Download
M runtime/vm/flow_graph_allocator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 28 chunks +121 lines, -32 lines 0 comments Download
M runtime/vm/flow_graph_compiler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +22 lines, -2 lines 0 comments Download
M runtime/vm/flow_graph_compiler_arm.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +12 lines, -10 lines 3 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/intermediate_language.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -1 line 0 comments Download
M runtime/vm/intermediate_language.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +3 lines, -2 lines 0 comments Download
M runtime/vm/intermediate_language_arm.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 19 chunks +266 lines, -224 lines 0 comments Download
M runtime/vm/intermediate_language_ia32.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 23 chunks +212 lines, -163 lines 0 comments Download
M runtime/vm/locations.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6 chunks +45 lines, -3 lines 0 comments Download
M runtime/vm/locations.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +19 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
Cutch
Architecture independent and IA32 is ready for review.
6 years, 7 months ago (2014-04-30 18:25:40 UTC) #1
srdjan
Please also add tests. https://codereview.chromium.org/252333002/diff/220001/runtime/vm/deopt_instructions.cc File runtime/vm/deopt_instructions.cc (right): https://codereview.chromium.org/252333002/diff/220001/runtime/vm/deopt_instructions.cc#newcode724 runtime/vm/deopt_instructions.cc:724: static int64_t CombineLoAndHi(int32_t* lo, int32_t* ...
6 years, 7 months ago (2014-04-30 18:46:01 UTC) #2
Florian Schneider
https://codereview.chromium.org/252333002/diff/220001/runtime/vm/intermediate_language_ia32.cc File runtime/vm/intermediate_language_ia32.cc (right): https://codereview.chromium.org/252333002/diff/220001/runtime/vm/intermediate_language_ia32.cc#newcode371 runtime/vm/intermediate_language_ia32.cc:371: __ movl(tmp, result_hi); I think tmp is not needed ...
6 years, 7 months ago (2014-04-30 18:55:45 UTC) #3
Cutch
https://codereview.chromium.org/252333002/diff/220001/runtime/vm/intermediate_language_ia32.cc File runtime/vm/intermediate_language_ia32.cc (right): https://codereview.chromium.org/252333002/diff/220001/runtime/vm/intermediate_language_ia32.cc#newcode371 runtime/vm/intermediate_language_ia32.cc:371: __ movl(tmp, result_hi); On 2014/04/30 18:55:46, Florian Schneider wrote: ...
6 years, 7 months ago (2014-05-14 17:16:19 UTC) #4
Cutch
+zra for ARM changes.
6 years, 7 months ago (2014-05-14 17:16:31 UTC) #5
zra
https://codereview.chromium.org/252333002/diff/260001/runtime/vm/assembler_arm.cc File runtime/vm/assembler_arm.cc (right): https://codereview.chromium.org/252333002/diff/260001/runtime/vm/assembler_arm.cc#newcode282 runtime/vm/assembler_arm.cc:282: void Assembler::SignFill(Register rd, Register rm) { Move to be ...
6 years, 7 months ago (2014-05-14 18:27:41 UTC) #6
Cutch
https://codereview.chromium.org/252333002/diff/260001/runtime/vm/assembler_arm.cc File runtime/vm/assembler_arm.cc (right): https://codereview.chromium.org/252333002/diff/260001/runtime/vm/assembler_arm.cc#newcode282 runtime/vm/assembler_arm.cc:282: void Assembler::SignFill(Register rd, Register rm) { On 2014/05/14 18:27:41, ...
6 years, 7 months ago (2014-05-15 18:26:07 UTC) #7
zra
arm code lgtm https://codereview.chromium.org/252333002/diff/260001/runtime/vm/intermediate_language_arm.cc File runtime/vm/intermediate_language_arm.cc (right): https://codereview.chromium.org/252333002/diff/260001/runtime/vm/intermediate_language_arm.cc#newcode529 runtime/vm/intermediate_language_arm.cc:529: __ cmp(left2, ShifterOperand(right2)); On 2014/05/15 18:26:08, ...
6 years, 7 months ago (2014-05-15 18:30:45 UTC) #8
Florian Schneider
Lgtm https://codereview.chromium.org/252333002/diff/340001/runtime/vm/deopt_instructions.cc File runtime/vm/deopt_instructions.cc (right): https://codereview.chromium.org/252333002/diff/340001/runtime/vm/deopt_instructions.cc#newcode724 runtime/vm/deopt_instructions.cc:724: static int64_t CombineLoAndHi(int32_t* lo, int32_t* hi) { Passing ...
6 years, 7 months ago (2014-05-21 12:50:59 UTC) #9
Cutch
https://codereview.chromium.org/252333002/diff/220001/runtime/vm/deopt_instructions.cc File runtime/vm/deopt_instructions.cc (right): https://codereview.chromium.org/252333002/diff/220001/runtime/vm/deopt_instructions.cc#newcode724 runtime/vm/deopt_instructions.cc:724: static int64_t CombineLoAndHi(int32_t* lo, int32_t* hi) { On 2014/04/30 ...
6 years, 7 months ago (2014-05-21 17:00:03 UTC) #10
srdjan
lgtm https://codereview.chromium.org/252333002/diff/360001/runtime/vm/assembler_arm.h File runtime/vm/assembler_arm.h (right): https://codereview.chromium.org/252333002/diff/360001/runtime/vm/assembler_arm.h#newcode354 runtime/vm/assembler_arm.h:354: void adcs(Register rd, Register rn, ShifterOperand so, Condition ...
6 years, 7 months ago (2014-05-21 17:12:48 UTC) #11
Cutch
https://codereview.chromium.org/252333002/diff/360001/runtime/vm/assembler_arm.h File runtime/vm/assembler_arm.h (right): https://codereview.chromium.org/252333002/diff/360001/runtime/vm/assembler_arm.h#newcode354 runtime/vm/assembler_arm.h:354: void adcs(Register rd, Register rn, ShifterOperand so, Condition cond ...
6 years, 7 months ago (2014-05-22 06:08:58 UTC) #12
Cutch
Committed patchset #20 manually as r36468 (presubmit successful).
6 years, 7 months ago (2014-05-22 06:31:01 UTC) #13
regis
DBC https://codereview.chromium.org/252333002/diff/380001/runtime/vm/assembler_arm.h File runtime/vm/assembler_arm.h (right): https://codereview.chromium.org/252333002/diff/380001/runtime/vm/assembler_arm.h#newcode702 runtime/vm/assembler_arm.h:702: void SignFill(Register rd, Register rm); For regularity, you ...
6 years, 7 months ago (2014-05-22 17:09:40 UTC) #14
Cutch
https://codereview.chromium.org/252333002/diff/380001/runtime/vm/deopt_instructions.h File runtime/vm/deopt_instructions.h (right): https://codereview.chromium.org/252333002/diff/380001/runtime/vm/deopt_instructions.h#newcode227 runtime/vm/deopt_instructions.h:227: kInt64RegisterPair, On 2014/05/22 17:09:40, regis wrote: > Why not ...
6 years, 7 months ago (2014-05-23 21:33:53 UTC) #15
regis
6 years, 7 months ago (2014-05-23 22:36:58 UTC) #16
Message was sent while issue was closed.
https://codereview.chromium.org/252333002/diff/380001/runtime/vm/deopt_instru...
File runtime/vm/deopt_instructions.h (right):

https://codereview.chromium.org/252333002/diff/380001/runtime/vm/deopt_instru...
runtime/vm/deopt_instructions.h:227: kInt64RegisterPair,
On 2014/05/23 21:33:54, Cutch wrote:
> On 2014/05/22 17:09:40, regis wrote:
> > Why not kRegisterPair?
> > kInt64RegisterPair sounds like a pair of 64-bit registers.
> 
> A kInt64RegisterPair is a mint (64-bit integer) which is in two register
> locations. 
> 
> A kInt64StackSlotPair is a mint which is in two stack slots.
> 
> A kInt64StackSlotRegister is a mint which has one half in a register location
> and the other half in a stack location.

Do I understand correctly that some of these are for 32-bit architectures only
and others for 64-bit architectures only?

Marking these as such would avoid confusion:
  kInt64RegisterPair,  // On 32-bit architectures only.
  kInt64StackSlot,  // On 64-bit architectures only.
  kInt64StackSlotPair,  // On 32-bit architectures only.
etc...

Maybe I still do not get it.
Let's chat next week.

https://codereview.chromium.org/252333002/diff/380001/runtime/vm/flow_graph_c...
File runtime/vm/flow_graph_compiler_arm.cc (right):

https://codereview.chromium.org/252333002/diff/380001/runtime/vm/flow_graph_c...
runtime/vm/flow_graph_compiler_arm.cc:1455: }
On 2014/05/23 21:33:54, Cutch wrote:
> On 2014/05/22 17:09:40, regis wrote:
> > Is there a good reason for this change? It should be documented.
> 
> Yes, there was a very serious bug where the stackmap for a safepoint encoded
> registers in the *opposite* order than __ PushList pushed them. This resulted
in
> random crashes during GC where a stack slot was expected to have an object (or
> smi) but it had an untagged value. I've added a note in my cleanup CL:
> 
> https://codereview.chromium.org/299833011

Cool you found it!

Powered by Google App Engine
This is Rietveld 408576698