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

Unified Diff: src/hydrogen-check-elimination.cc

Issue 150663005: Optimize redundant HCompareMap instructions with known successors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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/arm/lithium-arm.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-check-elimination.cc
diff --git a/src/hydrogen-check-elimination.cc b/src/hydrogen-check-elimination.cc
index cd002a1d5c80a5d9a76ee4eded2f889461958dc6..e12f14a13fb16b740fe6f4327970c5d77f7edca2 100644
--- a/src/hydrogen-check-elimination.cc
+++ b/src/hydrogen-check-elimination.cc
@@ -341,11 +341,15 @@ class HCheckTable : public ZoneObject {
if (maps == NULL) return;
if (maps->Contains(instr->map())) {
if (maps->size() == 1) {
- // TODO(titzer): replace with goto true branch
+ TRACE(("Marking redundant CompareMap #%d at B%d as true\n",
+ instr->id(), instr->block()->block_id()));
+ instr->set_known_successor_index(0);
INC_STAT(compares_true_);
}
} else {
- // TODO(titzer): replace with goto false branch
+ TRACE(("Marking redundant CompareMap #%d at B%d as false\n",
+ instr->id(), instr->block()->block_id()));
+ instr->set_known_successor_index(1);
INC_STAT(compares_false_);
}
}
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698