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

Unified Diff: src/compiler/load-elimination.cc

Issue 2510843002: [turbofan] Improve handling of TransitionElementsKind in load elimination. (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/load-elimination.cc
diff --git a/src/compiler/load-elimination.cc b/src/compiler/load-elimination.cc
index e50ebe19190c0313cd5c38f190199bf675655b76..0110b52f25b3f3cda7d032805d179011d6109602 100644
--- a/src/compiler/load-elimination.cc
+++ b/src/compiler/load-elimination.cc
@@ -866,6 +866,12 @@ LoadElimination::AbstractState const* LoadElimination::ComputeLoopState(
}
case IrOpcode::kTransitionElementsKind: {
Node* const object = NodeProperties::GetValueInput(current, 0);
+ Node* const target_map = NodeProperties::GetValueInput(current, 2);
+ Node* const object_map = state->LookupField(
+ object, FieldIndexOf(HeapObject::kMapOffset));
+ if (target_map == object_map) {
Benedikt Meurer 2016/11/16 20:22:19 Nit: Please do if (target_map != object_map) {
+ break;
+ }
state = state->KillField(
object, FieldIndexOf(HeapObject::kMapOffset), zone());
state = state->KillField(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698