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

Issue 10666026: Simple iterative liveness analysis over SSA. (Closed)

Created:
8 years, 6 months ago by Vyacheslav Egorov (Google)
Modified:
8 years, 6 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Simple iterative liveness analysis over SSA. R=fschneider@google.com BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=9069

Patch Set 1 #

Total comments: 38
Unified diffs Side-by-side diffs Delta from patch set Stats (+211 lines, -4 lines) Patch
M runtime/vm/bit_vector.h View 1 chunk +25 lines, -0 lines 7 comments Download
M runtime/vm/compiler.cc View 1 chunk +4 lines, -1 line 1 comment Download
M runtime/vm/flow_graph_allocator.h View 1 chunk +16 lines, -3 lines 3 comments Download
M runtime/vm/flow_graph_allocator.cc View 1 chunk +162 lines, -0 lines 27 comments Download
M runtime/vm/flow_graph_builder.h View 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Vyacheslav Egorov (Google)
8 years, 6 months ago (2012-06-25 14:12:38 UTC) #1
Florian Schneider
LGTM with comments. Maybe it would make sense to wait until we can iterate backwards ...
8 years, 6 months ago (2012-06-25 14:38:29 UTC) #2
Vyacheslav Egorov (Google)
https://chromiumcodereview.appspot.com/10666026/diff/1/runtime/vm/bit_vector.h File runtime/vm/bit_vector.h (right): https://chromiumcodereview.appspot.com/10666026/diff/1/runtime/vm/bit_vector.h#newcode66 runtime/vm/bit_vector.h:66: bool AddAll(BitVector* from) { On 2012/06/25 14:38:29, Florian Schneider ...
8 years, 6 months ago (2012-06-25 16:58:25 UTC) #3
srdjan
DBC https://chromiumcodereview.appspot.com/10666026/diff/1/runtime/vm/bit_vector.h File runtime/vm/bit_vector.h (right): https://chromiumcodereview.appspot.com/10666026/diff/1/runtime/vm/bit_vector.h#newcode66 runtime/vm/bit_vector.h:66: bool AddAll(BitVector* from) { The two methods seem ...
8 years, 6 months ago (2012-06-25 17:30:05 UTC) #4
Vyacheslav Egorov (Google)
Thanks for the DBC, I will address in a separate CL. https://chromiumcodereview.appspot.com/10666026/diff/1/runtime/vm/bit_vector.h File runtime/vm/bit_vector.h (right): ...
8 years, 6 months ago (2012-06-25 17:42:23 UTC) #5
srdjan
8 years, 6 months ago (2012-06-25 17:51:44 UTC) #6
https://chromiumcodereview.appspot.com/10666026/diff/1/runtime/vm/flow_graph_...
File runtime/vm/flow_graph_allocator.cc (right):

https://chromiumcodereview.appspot.com/10666026/diff/1/runtime/vm/flow_graph_...
runtime/vm/flow_graph_allocator.cc:94: Instruction* last =
instr->last_instruction();
On 2012/06/25 17:42:23, Vyacheslav Egorov (Google) wrote:
> On 2012/06/25 17:30:05, srdjan wrote:
> > ASSERT (last != NULL, live_out != NULL) ?
> 
> live_out_ != NULL is a fundamental property of initialization code. I don't
see
> a reason to assert it.
> 
> I am also not sure what is the benefit of asserting not-nullness for a values
> that are immediately derefed --- we will get SIGSEGV anyways. 

Agree with the fundamental property. SIGSEGV is much uglier to debug then an
ASSERT, IMHO.

https://chromiumcodereview.appspot.com/10666026/diff/1/runtime/vm/flow_graph_...
runtime/vm/flow_graph_allocator.cc:95: for (intptr_t i = 0; i <
last->SuccessorCount(); i++) {
On 2012/06/25 17:42:23, Vyacheslav Egorov (Google) wrote:
> On 2012/06/25 17:30:05, srdjan wrote:
> > SuccessotCount can be 0 or 1, is a loop necessary?
> 
> it can be 0, 1 (implicit goto), 2 (branch), 1 + #catch entries (graph entry).
> 
> if we introduce switch-tables we might get even more different values, so I
> prefer to have a loop.

Mea culpa.

https://chromiumcodereview.appspot.com/10666026/diff/1/runtime/vm/flow_graph_...
runtime/vm/flow_graph_allocator.cc:117: changed = false;
On 2012/06/25 17:42:23, Vyacheslav Egorov (Google) wrote:
> On 2012/06/25 17:30:05, srdjan wrote:
> > Remove this line.
> 
> I need to reset changed to false after each iteration. 

I negated the condition while reading. Mea Culpa

Powered by Google App Engine
This is Rietveld 408576698