Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/js-graph.h" | 7 #include "src/compiler/js-graph.h" |
| 8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
| 9 #include "src/compiler/simplified-operator.h" | 9 #include "src/compiler/simplified-operator.h" |
| 10 | 10 |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 469 break; | 469 break; |
| 470 case MachineRepresentation::kWord8: | 470 case MachineRepresentation::kWord8: |
| 471 case MachineRepresentation::kWord16: | 471 case MachineRepresentation::kWord16: |
| 472 case MachineRepresentation::kWord32: | 472 case MachineRepresentation::kWord32: |
| 473 case MachineRepresentation::kWord64: | 473 case MachineRepresentation::kWord64: |
| 474 case MachineRepresentation::kFloat32: | 474 case MachineRepresentation::kFloat32: |
| 475 // TODO(turbofan): Add support for doing the truncations. | 475 // TODO(turbofan): Add support for doing the truncations. |
| 476 break; | 476 break; |
| 477 case MachineRepresentation::kFloat64: | 477 case MachineRepresentation::kFloat64: |
| 478 case MachineRepresentation::kSimd128: | 478 case MachineRepresentation::kSimd128: |
| 479 case MachineRepresentation::kTaggedSigned: | |
| 480 case MachineRepresentation::kTaggedPointer: | |
| 479 case MachineRepresentation::kTagged: | 481 case MachineRepresentation::kTagged: |
| 480 state = state->AddElement(object, index, new_value, zone()); | 482 state = state->AddElement(object, index, new_value, zone()); |
| 481 break; | 483 break; |
| 482 } | 484 } |
| 483 return UpdateState(node, state); | 485 return UpdateState(node, state); |
| 484 } | 486 } |
| 485 | 487 |
| 486 Reduction LoadElimination::ReduceStoreTypedElement(Node* node) { | 488 Reduction LoadElimination::ReduceStoreTypedElement(Node* node) { |
| 487 Node* const effect = NodeProperties::GetEffectInput(node); | 489 Node* const effect = NodeProperties::GetEffectInput(node); |
| 488 AbstractState const* state = node_states_.Get(effect); | 490 AbstractState const* state = node_states_.Get(effect); |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 635 if (rep != MachineType::PointerRepresentation()) { | 637 if (rep != MachineType::PointerRepresentation()) { |
| 636 return -1; // We currently only track pointer size fields. | 638 return -1; // We currently only track pointer size fields. |
| 637 } | 639 } |
| 638 break; | 640 break; |
| 639 case MachineRepresentation::kWord8: | 641 case MachineRepresentation::kWord8: |
| 640 case MachineRepresentation::kWord16: | 642 case MachineRepresentation::kWord16: |
| 641 case MachineRepresentation::kFloat32: | 643 case MachineRepresentation::kFloat32: |
| 642 return -1; // Currently untracked. | 644 return -1; // Currently untracked. |
| 643 case MachineRepresentation::kFloat64: | 645 case MachineRepresentation::kFloat64: |
| 644 case MachineRepresentation::kSimd128: | 646 case MachineRepresentation::kSimd128: |
| 647 case MachineRepresentation::kTaggedSigned: | |
| 648 case MachineRepresentation::kTaggedPointer: | |
|
Benedikt Meurer
2016/08/05 18:49:01
These should be treated exactly like Tagged here.
mvstanton
2016/08/16 10:50:40
Done.
| |
| 649 return -1; // Currently untracked. | |
| 645 case MachineRepresentation::kTagged: | 650 case MachineRepresentation::kTagged: |
| 646 // TODO(bmeurer): Check that we never do overlapping load/stores of | 651 // TODO(bmeurer): Check that we never do overlapping load/stores of |
| 647 // individual parts of Float64/Simd128 values. | 652 // individual parts of Float64/Simd128 values. |
| 648 break; | 653 break; |
| 649 } | 654 } |
| 650 DCHECK_EQ(kTaggedBase, access.base_is_tagged); | 655 DCHECK_EQ(kTaggedBase, access.base_is_tagged); |
| 651 DCHECK_EQ(0, access.offset % kPointerSize); | 656 DCHECK_EQ(0, access.offset % kPointerSize); |
| 652 int field_index = access.offset / kPointerSize; | 657 int field_index = access.offset / kPointerSize; |
| 653 if (field_index >= static_cast<int>(kMaxTrackedFields)) return -1; | 658 if (field_index >= static_cast<int>(kMaxTrackedFields)) return -1; |
| 654 return field_index; | 659 return field_index; |
| 655 } | 660 } |
| 656 | 661 |
| 657 } // namespace compiler | 662 } // namespace compiler |
| 658 } // namespace internal | 663 } // namespace internal |
| 659 } // namespace v8 | 664 } // namespace v8 |
| OLD | NEW |