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

Issue 59613005: Merge (x & y) == 0 pattern to emit a single test instruction. (Closed)

Created:
7 years, 1 month ago by fschneider
Modified:
7 years, 1 month ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Merge (x & y) == 0 pattern to emit a single test instruction. This is based on a previous uncommitted CL by vegorov@ (https://codereview.chromium.org/14251023/). It is rebased and fixes a bug in the MIPS implementation: BranchOnCondition requires the comparison result in fixed registers CMPRES1/CMPRES2. Remove register alias TMP1 (=TMP) and CMPRES (=CMPRES1). It is confusing to have them around and easy to forget that they are actually the same. R=srdjan@google.com, zra@google.com Committed: https://code.google.com/p/dart/source/detail?r=29966

Patch Set 1 #

Patch Set 2 : #

Total comments: 10

Patch Set 3 : #

Patch Set 4 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+657 lines, -394 lines) Patch
M runtime/vm/assembler_arm.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M runtime/vm/assembler_arm.cc View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M runtime/vm/assembler_mips.h View 1 2 7 chunks +21 lines, -21 lines 0 comments Download
M runtime/vm/assembler_mips.cc View 1 2 13 chunks +55 lines, -55 lines 0 comments Download
M runtime/vm/assembler_x64.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/assembler_x64.cc View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
M runtime/vm/constants_mips.h View 1 2 2 chunks +1 line, -4 lines 0 comments Download
M runtime/vm/debugger_mips.cc View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M runtime/vm/flow_graph_compiler_mips.cc View 1 2 12 chunks +35 lines, -34 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 2 1 chunk +20 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_type_propagator.cc View 1 2 2 chunks +4 lines, -9 lines 0 comments Download
M runtime/vm/instructions_mips.cc View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M runtime/vm/intermediate_language.h View 1 2 5 chunks +49 lines, -11 lines 0 comments Download
M runtime/vm/intermediate_language.cc View 1 2 4 chunks +49 lines, -5 lines 0 comments Download
M runtime/vm/intermediate_language_arm.cc View 1 2 1 chunk +36 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language_ia32.cc View 1 2 1 chunk +36 lines, -0 lines 2 comments Download
M runtime/vm/intermediate_language_mips.cc View 1 2 36 chunks +146 lines, -112 lines 0 comments Download
M runtime/vm/intermediate_language_x64.cc View 1 2 1 chunk +36 lines, -0 lines 0 comments Download
M runtime/vm/intrinsifier_mips.cc View 1 2 32 chunks +68 lines, -68 lines 0 comments Download
M runtime/vm/object_mips_test.cc View 1 2 1 chunk +6 lines, -6 lines 0 comments Download
M runtime/vm/stub_code_mips.cc View 1 2 21 chunks +62 lines, -62 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Florian Schneider
7 years, 1 month ago (2013-11-05 17:09:05 UTC) #1
srdjan
lgtm https://codereview.chromium.org/59613005/diff/100001/runtime/vm/flow_graph_type_propagator.cc File runtime/vm/flow_graph_type_propagator.cc (right): https://codereview.chromium.org/59613005/diff/100001/runtime/vm/flow_graph_type_propagator.cc#newcode815 runtime/vm/flow_graph_type_propagator.cc:815: one more line https://codereview.chromium.org/59613005/diff/100001/runtime/vm/intermediate_language.cc File runtime/vm/intermediate_language.cc (right): https://codereview.chromium.org/59613005/diff/100001/runtime/vm/intermediate_language.cc#newcode1622 ...
7 years, 1 month ago (2013-11-05 18:30:34 UTC) #2
zra
lgtm Thanks for doing the MIPS cleanup! https://codereview.chromium.org/59613005/diff/100001/runtime/vm/intermediate_language.h File runtime/vm/intermediate_language.h (right): https://codereview.chromium.org/59613005/diff/100001/runtime/vm/intermediate_language.h#newcode700 runtime/vm/intermediate_language.h:700: M(TestSmi) It ...
7 years, 1 month ago (2013-11-05 18:38:03 UTC) #3
Florian Schneider
https://codereview.chromium.org/59613005/diff/100001/runtime/vm/flow_graph_type_propagator.cc File runtime/vm/flow_graph_type_propagator.cc (right): https://codereview.chromium.org/59613005/diff/100001/runtime/vm/flow_graph_type_propagator.cc#newcode815 runtime/vm/flow_graph_type_propagator.cc:815: On 2013/11/05 18:30:34, srdjan wrote: > one more line ...
7 years, 1 month ago (2013-11-06 12:13:42 UTC) #4
fschneider
Committed patchset #4 manually as r29966 (presubmit successful).
7 years, 1 month ago (2013-11-06 12:13:44 UTC) #5
sra1
https://codereview.chromium.org/59613005/diff/390001/runtime/vm/intermediate_language_ia32.cc File runtime/vm/intermediate_language_ia32.cc (right): https://codereview.chromium.org/59613005/diff/390001/runtime/vm/intermediate_language_ia32.cc#newcode582 runtime/vm/intermediate_language_ia32.cc:582: __ testl(left, Immediate(imm)); Does this need the xor-with-cookie treatment?
7 years, 1 month ago (2013-11-06 18:01:45 UTC) #6
Florian Schneider
7 years, 1 month ago (2013-11-06 18:13:46 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/59613005/diff/390001/runtime/vm/intermediate_...
File runtime/vm/intermediate_language_ia32.cc (right):

https://codereview.chromium.org/59613005/diff/390001/runtime/vm/intermediate_...
runtime/vm/intermediate_language_ia32.cc:582: __ testl(left, Immediate(imm));
On 2013/11/06 18:01:46, sra1 wrote:
> Does this need the xor-with-cookie treatment?

No, using Location::RegisterOrConstant in TestSmiInstr::MakeLocationSummary
above already checks the constraints for xor-with-cookie treatment: Itreturns
only a constant location operand if the smi constant is safe (<=16 bits).

Powered by Google App Engine
This is Rietveld 408576698