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

Issue 10867050: Separate branch on strict compare into a new IL instruction. (Closed)

Created:
8 years, 4 months ago by Florian Schneider
Modified:
8 years, 3 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Separate branch on strict compare into a new IL instruction. This avoid unnecessary environment uses since the strict compare can not deoptimize. This is a first step in refactoring branch instructions so that we can easily do explicit checks for specialized comparisons (smi, double). Committed: https://code.google.com/p/dart/source/detail?r=11373

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+201 lines, -100 lines) Patch
M runtime/vm/flow_graph_builder.cc View 2 chunks +6 lines, -10 lines 0 comments Download
M runtime/vm/il_printer.cc View 2 chunks +24 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language.h View 6 chunks +104 lines, -29 lines 5 comments Download
M runtime/vm/intermediate_language.cc View 3 chunks +5 lines, -5 lines 0 comments Download
M runtime/vm/intermediate_language_ia32.cc View 8 chunks +29 lines, -28 lines 0 comments Download
M runtime/vm/intermediate_language_x64.cc View 8 chunks +29 lines, -28 lines 0 comments Download
M runtime/vm/token.h View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Florian Schneider
8 years, 4 months ago (2012-08-24 12:17:53 UTC) #1
Kevin Millikin (Google)
LGTM. https://chromiumcodereview.appspot.com/10867050/diff/1/runtime/vm/intermediate_language.h File runtime/vm/intermediate_language.h (right): https://chromiumcodereview.appspot.com/10867050/diff/1/runtime/vm/intermediate_language.h#newcode1993 runtime/vm/intermediate_language.h:1993: M(Return) \ Return, Throw, ReThrow, and Goto should ...
8 years, 4 months ago (2012-08-24 12:37:26 UTC) #2
srdjan
https://chromiumcodereview.appspot.com/10867050/diff/1/runtime/vm/intermediate_language.h File runtime/vm/intermediate_language.h (right): https://chromiumcodereview.appspot.com/10867050/diff/1/runtime/vm/intermediate_language.h#newcode3118 runtime/vm/intermediate_language.h:3118: Token::Kind kind_; const
8 years, 4 months ago (2012-08-24 18:55:39 UTC) #3
srdjan
https://chromiumcodereview.appspot.com/10867050/diff/1/runtime/vm/intermediate_language.h File runtime/vm/intermediate_language.h (right): https://chromiumcodereview.appspot.com/10867050/diff/1/runtime/vm/intermediate_language.h#newcode3091 runtime/vm/intermediate_language.h:3091: class StrictCompareAndBranchInstr : public TemplateControlInstruction<2> { You could use ...
8 years, 4 months ago (2012-08-24 21:35:05 UTC) #4
Florian Schneider
8 years, 3 months ago (2012-08-27 08:55:30 UTC) #5
https://chromiumcodereview.appspot.com/10867050/diff/1/runtime/vm/intermediat...
File runtime/vm/intermediate_language.h (right):

https://chromiumcodereview.appspot.com/10867050/diff/1/runtime/vm/intermediat...
runtime/vm/intermediate_language.h:3091: class StrictCompareAndBranchInstr :
public TemplateControlInstruction<2> {
On 2012/08/24 21:35:05, srdjan wrote:
> You could use this to replace BranchInstr in
> FlowGraphOptimizer::VisitBranch(BranchInstr* instr) .

Currently it is not very convenient to replace branch instructions because of
updating the control flow graph. I'm doing it in the builder instead, since this
is an optimization that does not rely on type feedback and can therefore also be
done in the non-optimizing case.

https://chromiumcodereview.appspot.com/10867050/diff/1/runtime/vm/intermediat...
runtime/vm/intermediate_language.h:3118: Token::Kind kind_;
On 2012/08/24 18:55:39, srdjan wrote:
> const 

Done.

Powered by Google App Engine
This is Rietveld 408576698