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

Unified Diff: src/hydrogen-dce.cc

Issue 31943002: Allow constants to be deleted by reinserting them into the graph as needed. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-dce.cc
diff --git a/src/hydrogen-dce.cc b/src/hydrogen-dce.cc
index 3b64107fa119fe1c0245bd33313b80c1809c33d4..e101ee5bcc58bd624358005a54b96d23237d3d21 100644
--- a/src/hydrogen-dce.cc
+++ b/src/hydrogen-dce.cc
@@ -98,11 +98,7 @@ void HDeadCodeEliminationPhase::RemoveDeadInstructions() {
HInstruction* instr = it.Current();
if (!instr->CheckFlag(HValue::kIsLive)) {
// Instruction has not been marked live, so remove it.
- if (!instr->IsConstant() || instr->block()->block_id() != 0) {
- // TODO(titzer): Some global constants in block 0 can be used
- // again later, and can't currently be removed. Fix that.
- instr->DeleteAndReplaceWith(NULL);
- }
+ instr->DeleteAndReplaceWith(NULL);
} else {
// Clear the liveness flag to leave the graph clean for the next DCE.
instr->ClearFlag(HValue::kIsLive);
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698