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

Issue 10909094: Implement loop invariant code motion for check instructions. (Closed)

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

Description

Implement loop invariant code motion for check instructions. This CL adds a new optimization pass that hoist loop invariant instructions upwards out of loops. I'm adding a deoptimzation point at every Goto so that we can move deoptimizing instructions like checks out of loops. As a result there may be multiple deoptimization descriptors with the same PC. The corresponding assert are removed. Committed: https://code.google.com/p/dart/source/detail?r=11946

Patch Set 1 #

Total comments: 16
Unified diffs Side-by-side diffs Delta from patch set Stats (+231 lines, -8 lines) Patch
M runtime/vm/code_generator.cc View 1 chunk +1 line, -0 lines 2 comments Download
M runtime/vm/compiler.cc View 2 chunks +4 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph.h View 3 chunks +33 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph.cc View 3 chunks +58 lines, -1 line 4 comments Download
M runtime/vm/flow_graph_optimizer.h View 1 chunk +7 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 chunk +65 lines, -0 lines 2 comments Download
M runtime/vm/growable_array.h View 1 chunk +9 lines, -0 lines 2 comments Download
M runtime/vm/il_printer.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/intermediate_language.h View 9 chunks +25 lines, -2 lines 2 comments Download
M runtime/vm/intermediate_language.cc View 3 chunks +26 lines, -0 lines 2 comments Download
M runtime/vm/object.cc View 4 chunks +2 lines, -4 lines 2 comments Download

Messages

Total messages: 5 (0 generated)
Florian Schneider
8 years, 3 months ago (2012-09-06 12:13:36 UTC) #1
Kevin Millikin (Google)
LGTM with small comments. https://chromiumcodereview.appspot.com/10909094/diff/1/runtime/vm/code_generator.cc File runtime/vm/code_generator.cc (right): https://chromiumcodereview.appspot.com/10909094/diff/1/runtime/vm/code_generator.cc#newcode1632 runtime/vm/code_generator.cc:1632: ASSERT(continue_at_pc != 0); Thank you. ...
8 years, 3 months ago (2012-09-06 12:42:41 UTC) #2
Florian Schneider
https://chromiumcodereview.appspot.com/10909094/diff/1/runtime/vm/code_generator.cc File runtime/vm/code_generator.cc (right): https://chromiumcodereview.appspot.com/10909094/diff/1/runtime/vm/code_generator.cc#newcode1632 runtime/vm/code_generator.cc:1632: ASSERT(continue_at_pc != 0); On 2012/09/06 12:42:42, kmillikin wrote: > ...
8 years, 3 months ago (2012-09-06 13:05:53 UTC) #3
srdjan
DBC https://chromiumcodereview.appspot.com/10909094/diff/1/runtime/vm/flow_graph.cc File runtime/vm/flow_graph.cc (right): https://chromiumcodereview.appspot.com/10909094/diff/1/runtime/vm/flow_graph.cc#newcode672 runtime/vm/flow_graph.cc:672: static void FindLoop(BlockEntryInstr* m, BlockEntryInstr* n) { There ...
8 years, 3 months ago (2012-09-06 13:44:26 UTC) #4
Florian Schneider
8 years, 3 months ago (2012-09-06 13:49:30 UTC) #5
I'll address you comments in a new CL.

https://chromiumcodereview.appspot.com/10909094/diff/1/runtime/vm/flow_graph.cc
File runtime/vm/flow_graph.cc (right):

https://chromiumcodereview.appspot.com/10909094/diff/1/runtime/vm/flow_graph....
runtime/vm/flow_graph.cc:672: static void FindLoop(BlockEntryInstr* m,
BlockEntryInstr* n) {
On 2012/09/06 13:44:26, srdjan wrote:
> There is also FlowGraphAllocator::DiscoverLoops, how do they differ, are they
> both necessary?

Good point. I didn't remember that we have such a thing. Mine is more generic,
so I'll replace the old one.

https://chromiumcodereview.appspot.com/10909094/diff/1/runtime/vm/intermediat...
File runtime/vm/intermediate_language.h (right):

https://chromiumcodereview.appspot.com/10909094/diff/1/runtime/vm/intermediat...
runtime/vm/intermediate_language.h:431: friend class LICM;
On 2012/09/06 13:44:26, srdjan wrote:
> Please add why, or move the comment if it is valid for both.
 Moved it to below where the comment applies.

https://chromiumcodereview.appspot.com/10909094/diff/1/runtime/vm/object.cc
File runtime/vm/object.cc (right):

https://chromiumcodereview.appspot.com/10909094/diff/1/runtime/vm/object.cc#n...
runtime/vm/object.cc:6731: // A function without unique ids is marked as
non-optimizable (e.g., because of
On 2012/09/06 13:44:26, srdjan wrote:
> Maybe replace removed comment with what you said in the CL.

Done.

Powered by Google App Engine
This is Rietveld 408576698