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

Issue 21014004: Add equality type parameter to HCompareObjectAndBranch (Closed)

Created:
7 years, 4 months ago by danno
Modified:
7 years, 1 month ago
Reviewers:
titzer
CC:
v8-dev
Visibility:
Public.

Description

Add equality type parameter to HCompareObjectAndBranch R=titzer@chromium.org

Patch Set 1 #

Total comments: 4

Patch Set 2 : Review feedback #

Patch Set 3 : Review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -69 lines) Patch
M src/arm/lithium-arm.h View 3 chunks +6 lines, -6 lines 0 comments Download
M src/arm/lithium-arm.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M src/arm/lithium-codegen-arm.cc View 2 chunks +4 lines, -1 line 0 comments Download
M src/code-stubs-hydrogen.cc View 6 chunks +7 lines, -7 lines 0 comments Download
M src/hydrogen.cc View 10 chunks +17 lines, -17 lines 0 comments Download
M src/hydrogen-instructions.h View 1 2 4 chunks +15 lines, -4 lines 0 comments Download
M src/hydrogen-instructions.cc View 1 1 chunk +3 lines, -1 line 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 3 chunks +5 lines, -2 lines 0 comments Download
M src/ia32/lithium-ia32.h View 3 chunks +6 lines, -5 lines 0 comments Download
M src/ia32/lithium-ia32.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M src/mips/lithium-codegen-mips.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/mips/lithium-mips.h View 3 chunks +6 lines, -6 lines 0 comments Download
M src/mips/lithium-mips.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M src/x64/lithium-codegen-x64.cc View 3 chunks +9 lines, -2 lines 0 comments Download
M src/x64/lithium-x64.h View 3 chunks +6 lines, -5 lines 0 comments Download
M src/x64/lithium-x64.cc View 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
danno
7 years, 4 months ago (2013-07-29 11:29:08 UTC) #1
titzer
https://codereview.chromium.org/21014004/diff/1/src/hydrogen-instructions.cc File src/hydrogen-instructions.cc (right): https://codereview.chromium.org/21014004/diff/1/src/hydrogen-instructions.cc#newcode3076 src/hydrogen-instructions.cc:3076: void HCompareObjectAndBranch::PrintDataTo(StringStream* stream) { We should probably print the ...
7 years, 4 months ago (2013-07-29 13:24:41 UTC) #2
danno
https://codereview.chromium.org/21014004/diff/1/src/hydrogen-instructions.cc File src/hydrogen-instructions.cc (right): https://codereview.chromium.org/21014004/diff/1/src/hydrogen-instructions.cc#newcode3076 src/hydrogen-instructions.cc:3076: void HCompareObjectAndBranch::PrintDataTo(StringStream* stream) { On 2013/07/29 13:24:41, titzer wrote: ...
7 years, 4 months ago (2013-07-29 14:44:59 UTC) #3
titzer
7 years, 4 months ago (2013-07-30 08:31:05 UTC) #4
On 2013/07/29 14:44:59, danno wrote:
> https://codereview.chromium.org/21014004/diff/1/src/hydrogen-instructions.cc
> File src/hydrogen-instructions.cc (right):
> 
>
https://codereview.chromium.org/21014004/diff/1/src/hydrogen-instructions.cc#...
> src/hydrogen-instructions.cc:3076: void
> HCompareObjectAndBranch::PrintDataTo(StringStream* stream) {
> On 2013/07/29 13:24:41, titzer wrote:
> > We should probably print the token now too, right?
> 
> Done.
> 
> https://codereview.chromium.org/21014004/diff/1/src/hydrogen-instructions.h
> File src/hydrogen-instructions.h (right):
> 
>
https://codereview.chromium.org/21014004/diff/1/src/hydrogen-instructions.h#n...
> src/hydrogen-instructions.h:4175: Token::Value token = Token::EQ) {
> On 2013/07/29 13:24:41, titzer wrote:
> > I looked, but I couldn't find any uses with the token == NE. We have the
> > IfBuilder which can do IfNot, so do we need this parameterization?
> 
> It's used in a follow-on CL that I'm preparing, but I wanted to do this
> incrementally. The problem with IfNot is that it just switches the true/false
> branch blocks. But the instructions that are output are still: "cmp XXXX,
> b(eq,XXXX)", which makes the fall-through case always the not-equal case. In
the
> follow-on CL to convert numeric dictionary lookup to hydrogen that I'm
> preparing, in order to generate the same code as the old assembly-language
> version, the fall-through case needs to be the "ne" case, and it measurably
> affects performance if it isn't because it has to create extra jumps to sort
of
> the graph topology. Someday, out instruction selection should be able to
figure
> this out itself, but that's unfortunately a long way off.

That makes sense. But maybe it would be better to make it explicit to the
backends which direction we expect the branch to go (via assume_taken or
assume_not_taken) instead of it implicitly assuming the branch to be not taken
and then using EQ/NE.

Powered by Google App Engine
This is Rietveld 408576698