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

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

Issue 2216383002: TurboFan: Introduce TaggedSigned and TaggedPointer representations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Mips compile fix. Created 4 years, 4 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 | « src/compiler/instruction.cc ('k') | src/compiler/machine-operator.cc » ('j') | 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/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 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 break; 507 break;
508 case MachineRepresentation::kWord8: 508 case MachineRepresentation::kWord8:
509 case MachineRepresentation::kWord16: 509 case MachineRepresentation::kWord16:
510 case MachineRepresentation::kWord32: 510 case MachineRepresentation::kWord32:
511 case MachineRepresentation::kWord64: 511 case MachineRepresentation::kWord64:
512 case MachineRepresentation::kFloat32: 512 case MachineRepresentation::kFloat32:
513 // TODO(turbofan): Add support for doing the truncations. 513 // TODO(turbofan): Add support for doing the truncations.
514 break; 514 break;
515 case MachineRepresentation::kFloat64: 515 case MachineRepresentation::kFloat64:
516 case MachineRepresentation::kSimd128: 516 case MachineRepresentation::kSimd128:
517 case MachineRepresentation::kTaggedSigned:
518 case MachineRepresentation::kTaggedPointer:
517 case MachineRepresentation::kTagged: 519 case MachineRepresentation::kTagged:
518 state = state->AddElement(object, index, new_value, zone()); 520 state = state->AddElement(object, index, new_value, zone());
519 break; 521 break;
520 } 522 }
521 return UpdateState(node, state); 523 return UpdateState(node, state);
522 } 524 }
523 525
524 Reduction LoadElimination::ReduceStoreTypedElement(Node* node) { 526 Reduction LoadElimination::ReduceStoreTypedElement(Node* node) {
525 Node* const effect = NodeProperties::GetEffectInput(node); 527 Node* const effect = NodeProperties::GetEffectInput(node);
526 AbstractState const* state = node_states_.Get(effect); 528 AbstractState const* state = node_states_.Get(effect);
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 if (rep != MachineType::PointerRepresentation()) { 683 if (rep != MachineType::PointerRepresentation()) {
682 return -1; // We currently only track pointer size fields. 684 return -1; // We currently only track pointer size fields.
683 } 685 }
684 break; 686 break;
685 case MachineRepresentation::kWord8: 687 case MachineRepresentation::kWord8:
686 case MachineRepresentation::kWord16: 688 case MachineRepresentation::kWord16:
687 case MachineRepresentation::kFloat32: 689 case MachineRepresentation::kFloat32:
688 return -1; // Currently untracked. 690 return -1; // Currently untracked.
689 case MachineRepresentation::kFloat64: 691 case MachineRepresentation::kFloat64:
690 case MachineRepresentation::kSimd128: 692 case MachineRepresentation::kSimd128:
693 return -1; // Currently untracked.
694 case MachineRepresentation::kTaggedSigned:
695 case MachineRepresentation::kTaggedPointer:
691 case MachineRepresentation::kTagged: 696 case MachineRepresentation::kTagged:
692 // TODO(bmeurer): Check that we never do overlapping load/stores of 697 // TODO(bmeurer): Check that we never do overlapping load/stores of
693 // individual parts of Float64/Simd128 values. 698 // individual parts of Float64/Simd128 values.
694 break; 699 break;
695 } 700 }
696 DCHECK_EQ(kTaggedBase, access.base_is_tagged); 701 DCHECK_EQ(kTaggedBase, access.base_is_tagged);
697 DCHECK_EQ(0, access.offset % kPointerSize); 702 DCHECK_EQ(0, access.offset % kPointerSize);
698 int field_index = access.offset / kPointerSize; 703 int field_index = access.offset / kPointerSize;
699 if (field_index >= static_cast<int>(kMaxTrackedFields)) return -1; 704 if (field_index >= static_cast<int>(kMaxTrackedFields)) return -1;
700 return field_index; 705 return field_index;
701 } 706 }
702 707
703 } // namespace compiler 708 } // namespace compiler
704 } // namespace internal 709 } // namespace internal
705 } // namespace v8 710 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction.cc ('k') | src/compiler/machine-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698