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

Issue 10520004: Transform HGlobalValueNumberer::AnalyzeBlock from recursive into an iteraive loop keeping the trave… (Closed)

Created:
8 years, 6 months ago by Massi
Modified:
8 years, 6 months ago
Reviewers:
Jakob Kummerow
CC:
v8-dev
Visibility:
Public.

Description

Transform HGlobalValueNumberer::AnalyzeBlock from recursive into an iteraive loop keeping the traversal state in the zone instead of on the stack. Fixed issue 129536. BUG=129536 TEST= Committed: https://code.google.com/p/v8/source/detail?r=11712

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+201 lines, -78 lines) Patch
M src/hydrogen.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/hydrogen.cc View 4 chunks +200 lines, -78 lines 6 comments Download

Messages

Total messages: 2 (0 generated)
Massi
Good for review (passes make check and fixes the bug).
8 years, 6 months ago (2012-06-04 14:32:38 UTC) #1
Jakob Kummerow
8 years, 6 months ago (2012-06-04 16:33:58 UTC) #2
LGTM with minor comments.

Also, I think it would be nice to add a few sentences of high-level comments
giving an overview of how the code works (does a DFS through the dominator tree,
keeps a stack with status information about currently active levels in the
zone).

https://chromiumcodereview.appspot.com/10520004/diff/1/src/hydrogen.cc
File src/hydrogen.cc (right):

https://chromiumcodereview.appspot.com/10520004/diff/1/src/hydrogen.cc#newcod...
src/hydrogen.cc:1362: *this = *other;  // Calls operator=
nit: full stop at the end of the comment please.

https://chromiumcodereview.appspot.com/10520004/diff/1/src/hydrogen.cc#newcod...
src/hydrogen.cc:1858: *dominator = NULL;
IIUC, the value of *dominator doesn't matter when you return NULL, since that
indicates the end of the iteration.

https://chromiumcodereview.appspot.com/10520004/diff/1/src/hydrogen.cc#newcod...
src/hydrogen.cc:1859: result = NULL;
Unnecessary; result == NULL here anyway.

https://chromiumcodereview.appspot.com/10520004/diff/1/src/hydrogen.cc#newcod...
src/hydrogen.cc:2009: HBasicBlock *dominator_block;
nit: s/ */* /

https://chromiumcodereview.appspot.com/10520004/diff/1/src/hydrogen.cc#newcod...
src/hydrogen.cc:2015: // No need to copy the map for the last child in the
dominator tree.
I think this comment should go inside GvnBasicBlockState::next_dominated() now.

https://chromiumcodereview.appspot.com/10520004/diff/1/src/hydrogen.cc#newcod...
src/hydrogen.cc:2028: CollectSideEffectsOnPathsToDominatedBlock(dominator_block,
dominated);
nit: long line

Powered by Google App Engine
This is Rietveld 408576698