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

Issue 10796108: Add a backward instruction iterator and use it in the liveness analysis. (Closed)

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

Description

Add a backward instruction iterator and use it in the liveness analysis. This avoids the complication when collecting the initial live_in sets while iterating forward. Also simplify the ForwardInstructionIterator class because we have Goto instructions now and the last instruction of each block does not use the next-link to indicate a fall-through anymore. Committed: https://code.google.com/p/dart/source/detail?r=9875

Patch Set 1 #

Total comments: 7

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -38 lines) Patch
M vm/bit_vector.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M vm/bit_vector_test.cc View 1 1 chunk +8 lines, -0 lines 0 comments Download
M vm/flow_graph_allocator.cc View 1 2 chunks +31 lines, -25 lines 0 comments Download
M vm/intermediate_language.h View 1 3 chunks +24 lines, -3 lines 0 comments Download
M vm/intermediate_language.cc View 1 1 chunk +4 lines, -10 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Florian Schneider
The two classes ForwardInstructionIterator and BackwardInstructionIterator could share some code (e.g. Current()) For now I ...
8 years, 5 months ago (2012-07-24 14:24:15 UTC) #1
Kevin Millikin (Google)
LGTM.
8 years, 5 months ago (2012-07-24 14:40:40 UTC) #2
Vyacheslav Egorov (Google)
LGTM
8 years, 5 months ago (2012-07-24 14:43:57 UTC) #3
srdjan
LGTM https://chromiumcodereview.appspot.com/10796108/diff/1/vm/flow_graph_allocator.cc File vm/flow_graph_allocator.cc (right): https://chromiumcodereview.appspot.com/10796108/diff/1/vm/flow_graph_allocator.cc#newcode71 vm/flow_graph_allocator.cc:71: // Iterate backwards. Add:, starting with the last ...
8 years, 5 months ago (2012-07-24 15:49:30 UTC) #4
srdjan
https://chromiumcodereview.appspot.com/10796108/diff/1/vm/flow_graph_allocator.cc File vm/flow_graph_allocator.cc (right): https://chromiumcodereview.appspot.com/10796108/diff/1/vm/flow_graph_allocator.cc#newcode77 vm/flow_graph_allocator.cc:77: if ((current_def != NULL) && (current_def->ssa_temp_index() >= 0)) { ...
8 years, 5 months ago (2012-07-24 17:41:44 UTC) #5
Florian Schneider
https://chromiumcodereview.appspot.com/10796108/diff/1/vm/flow_graph_allocator.cc File vm/flow_graph_allocator.cc (right): https://chromiumcodereview.appspot.com/10796108/diff/1/vm/flow_graph_allocator.cc#newcode71 vm/flow_graph_allocator.cc:71: // Iterate backwards. On 2012/07/24 15:49:30, srdjan wrote: > ...
8 years, 5 months ago (2012-07-25 08:31:29 UTC) #6
srdjan
8 years, 5 months ago (2012-07-25 15:19:29 UTC) #7
https://chromiumcodereview.appspot.com/10796108/diff/1/vm/intermediate_langua...
File vm/intermediate_language.h (right):

https://chromiumcodereview.appspot.com/10796108/diff/1/vm/intermediate_langua...
vm/intermediate_language.h:1989: Instruction* Current() const { return current_;
}
On 2012/07/25 08:31:29, Florian Schneider wrote:
> On 2012/07/24 15:49:30, srdjan wrote:
> > s/Current/current/   (also for ForwardInstructionIterator)
> 
> I leave it as is to be consistent with the names of the other functions in the
> iterator interface (either all lower- or all upper-case)

Yes, the consistency argument is valid.
Since lower-casing is is used to denote calling short inlined functions, the
best will be to change Advance, Done, and Current  to lower case. See C++ style
guide:
http://www.corp.google.com/eng/doc/cppguide.xml?showone=Function_Names#Functi...

Powered by Google App Engine
This is Rietveld 408576698