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

Issue 11088027: Added a simple dead code removal phase. (Closed)

Created:
8 years, 2 months ago by Sven Panne
Modified:
8 years, 2 months ago
Reviewers:
Jakob Kummerow
CC:
v8-dev
Visibility:
Public.

Description

Added a simple dead code removal phase. We iteratively remove all dead Hydrogen instruction until we reach a fixed point. We consider an instruction dead if it is unused, has no observable side effects and is deletable. The last part of the condition is currently not very nice: We basically have to whitelist "safe" instructions, because we are missing more detailed dependencies and/or more detailed tracking of side effects. We disable dead code elimination for now in our test runners, because we have tons of poorly written tests which wouldn't test anymore what they are supposed to test with this phase enabled. To get test coverage for dead code elimination itself, we should enable it on a few build bots. This is not really a perfect state, but the best we can do for now. This patch includes a few const-correctness fixes, most of them were necessary for this CL. Committed: https://code.google.com/p/v8/source/detail?r=12697

Patch Set 1 #

Patch Set 2 : Introduced IsDeletable. Const fixes. #

Total comments: 2

Patch Set 3 : Addressed review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+197 lines, -25 lines) Patch
M src/flag-definitions.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/hydrogen.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/hydrogen.cc View 1 2 chunks +31 lines, -0 lines 0 comments Download
M src/hydrogen-instructions.h View 1 2 55 chunks +137 lines, -11 lines 0 comments Download
M src/hydrogen-instructions.cc View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/property-details.h View 1 2 chunks +7 lines, -5 lines 0 comments Download
M src/utils.h View 1 2 chunks +11 lines, -2 lines 0 comments Download
M tools/run-tests.py View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M tools/test.py View 1 2 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Sven Panne
8 years, 2 months ago (2012-10-10 14:38:40 UTC) #1
Jakob Kummerow
As discussed, we should adapt the test driver in this CL too. IMHO, less verbose ...
8 years, 2 months ago (2012-10-10 15:24:18 UTC) #2
Sven Panne
Landing... https://codereview.chromium.org/11088027/diff/2001/src/hydrogen-instructions.h File src/hydrogen-instructions.h (right): https://codereview.chromium.org/11088027/diff/2001/src/hydrogen-instructions.h#newcode4435 src/hydrogen-instructions.h:4435: return elements_kind_ != EXTERNAL_UNSIGNED_INT_ELEMENTS; On 2012/10/10 15:24:18, Jakob ...
8 years, 2 months ago (2012-10-11 06:48:32 UTC) #3
Jakob Kummerow
8 years, 2 months ago (2012-10-11 10:49:13 UTC) #4
lgtm

Powered by Google App Engine
This is Rietveld 408576698