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

Side by Side Diff: src/compiler/load-elimination.cc

Issue 2813183002: [turbofan] Do not eagerly kill elements for slow transitions in loop state. (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/load-elimination.h" 5 #include "src/compiler/load-elimination.h"
6 6
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/js-graph.h" 8 #include "src/compiler/js-graph.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 #include "src/compiler/simplified-operator.h" 10 #include "src/compiler/simplified-operator.h"
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
1000 break; 1000 break;
1001 } 1001 }
1002 case IrOpcode::kTransitionElementsKind: { 1002 case IrOpcode::kTransitionElementsKind: {
1003 ElementsTransition transition = ElementsTransitionOf(current->op()); 1003 ElementsTransition transition = ElementsTransitionOf(current->op());
1004 Node* const object = NodeProperties::GetValueInput(current, 0); 1004 Node* const object = NodeProperties::GetValueInput(current, 0);
1005 ZoneHandleSet<Map> object_maps; 1005 ZoneHandleSet<Map> object_maps;
1006 if (!state->LookupMaps(object, &object_maps) || 1006 if (!state->LookupMaps(object, &object_maps) ||
1007 !ZoneHandleSet<Map>(transition.target()) 1007 !ZoneHandleSet<Map>(transition.target())
1008 .contains(object_maps)) { 1008 .contains(object_maps)) {
1009 state = state->KillMaps(object, zone()); 1009 state = state->KillMaps(object, zone());
1010 state = state->KillField( 1010 switch (transition.mode()) {
1011 object, FieldIndexOf(JSObject::kElementsOffset), zone()); 1011 case ElementsTransition::kFastTransition:
1012 break;
1013 case ElementsTransition::kSlowTransition:
1014 // Kill the elements as well.
1015 state = state->KillField(
1016 object, FieldIndexOf(JSObject::kElementsOffset), zone());
1017 break;
1018 }
1012 } 1019 }
1013 break; 1020 break;
1014 } 1021 }
1015 case IrOpcode::kStoreField: { 1022 case IrOpcode::kStoreField: {
1016 FieldAccess const& access = FieldAccessOf(current->op()); 1023 FieldAccess const& access = FieldAccessOf(current->op());
1017 Node* const object = NodeProperties::GetValueInput(current, 0); 1024 Node* const object = NodeProperties::GetValueInput(current, 0);
1018 if (access.offset == HeapObject::kMapOffset) { 1025 if (access.offset == HeapObject::kMapOffset) {
1019 // Invalidate what we know about the {object}s map. 1026 // Invalidate what we know about the {object}s map.
1020 state = state->KillMaps(object, zone()); 1027 state = state->KillMaps(object, zone());
1021 } else { 1028 } else {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 return jsgraph()->common(); 1111 return jsgraph()->common();
1105 } 1112 }
1106 1113
1107 Graph* LoadElimination::graph() const { return jsgraph()->graph(); } 1114 Graph* LoadElimination::graph() const { return jsgraph()->graph(); }
1108 1115
1109 Factory* LoadElimination::factory() const { return jsgraph()->factory(); } 1116 Factory* LoadElimination::factory() const { return jsgraph()->factory(); }
1110 1117
1111 } // namespace compiler 1118 } // namespace compiler
1112 } // namespace internal 1119 } // namespace internal
1113 } // namespace v8 1120 } // namespace v8
OLDNEW
« 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