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

Side by Side Diff: src/compiler/machine-operator.h

Issue 2867403002: Revert of [turbofan] Add alignment parameter to StackSlot operator (Closed)
Patch Set: Created 3 years, 7 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-selector.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #ifndef V8_COMPILER_MACHINE_OPERATOR_H_ 5 #ifndef V8_COMPILER_MACHINE_OPERATOR_H_
6 #define V8_COMPILER_MACHINE_OPERATOR_H_ 6 #define V8_COMPILER_MACHINE_OPERATOR_H_
7 7
8 #include "src/base/compiler-specific.h" 8 #include "src/base/compiler-specific.h"
9 #include "src/base/flags.h" 9 #include "src/base/flags.h"
10 #include "src/globals.h" 10 #include "src/globals.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 typedef MachineType CheckedLoadRepresentation; 86 typedef MachineType CheckedLoadRepresentation;
87 87
88 CheckedLoadRepresentation CheckedLoadRepresentationOf(Operator const*); 88 CheckedLoadRepresentation CheckedLoadRepresentationOf(Operator const*);
89 89
90 90
91 // A CheckedStore needs a MachineType. 91 // A CheckedStore needs a MachineType.
92 typedef MachineRepresentation CheckedStoreRepresentation; 92 typedef MachineRepresentation CheckedStoreRepresentation;
93 93
94 CheckedStoreRepresentation CheckedStoreRepresentationOf(Operator const*); 94 CheckedStoreRepresentation CheckedStoreRepresentationOf(Operator const*);
95 95
96 class StackSlotRepresentation final { 96 int StackSlotSizeOf(Operator const* op);
97 public:
98 StackSlotRepresentation(int size, int alignment)
99 : size_(size), alignment_(alignment) {}
100
101 int size() const { return size_; }
102 int alignment() const { return alignment_; }
103
104 private:
105 int size_;
106 int alignment_;
107 };
108
109 V8_EXPORT_PRIVATE bool operator==(StackSlotRepresentation,
110 StackSlotRepresentation);
111 bool operator!=(StackSlotRepresentation, StackSlotRepresentation);
112
113 size_t hash_value(StackSlotRepresentation);
114
115 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&,
116 StackSlotRepresentation);
117
118 StackSlotRepresentation const& StackSlotRepresentationOf(Operator const* op);
119 97
120 MachineRepresentation AtomicStoreRepresentationOf(Operator const* op); 98 MachineRepresentation AtomicStoreRepresentationOf(Operator const* op);
121 99
122 MachineType AtomicOpRepresentationOf(Operator const* op); 100 MachineType AtomicOpRepresentationOf(Operator const* op);
123 101
124 // Interface for building machine-level operators. These operators are 102 // Interface for building machine-level operators. These operators are
125 // machine-level but machine-independent and thus define a language suitable 103 // machine-level but machine-independent and thus define a language suitable
126 // for generating code to run on architectures such as ia32, x64, arm, etc. 104 // for generating code to run on architectures such as ia32, x64, arm, etc.
127 class V8_EXPORT_PRIVATE MachineOperatorBuilder final 105 class V8_EXPORT_PRIVATE MachineOperatorBuilder final
128 : public NON_EXPORTED_BASE(ZoneObject) { 106 : public NON_EXPORTED_BASE(ZoneObject) {
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 // store [base + index], value 592 // store [base + index], value
615 const Operator* Store(StoreRepresentation rep); 593 const Operator* Store(StoreRepresentation rep);
616 const Operator* ProtectedStore(MachineRepresentation rep); 594 const Operator* ProtectedStore(MachineRepresentation rep);
617 595
618 // unaligned load [base + index] 596 // unaligned load [base + index]
619 const Operator* UnalignedLoad(UnalignedLoadRepresentation rep); 597 const Operator* UnalignedLoad(UnalignedLoadRepresentation rep);
620 598
621 // unaligned store [base + index], value 599 // unaligned store [base + index], value
622 const Operator* UnalignedStore(UnalignedStoreRepresentation rep); 600 const Operator* UnalignedStore(UnalignedStoreRepresentation rep);
623 601
624 const Operator* StackSlot(int size, int alignment = 0); 602 const Operator* StackSlot(int size);
625 const Operator* StackSlot(MachineRepresentation rep, int alignment = 0); 603 const Operator* StackSlot(MachineRepresentation rep);
626 604
627 // Access to the machine stack. 605 // Access to the machine stack.
628 const Operator* LoadStackPointer(); 606 const Operator* LoadStackPointer();
629 const Operator* LoadFramePointer(); 607 const Operator* LoadFramePointer();
630 const Operator* LoadParentFramePointer(); 608 const Operator* LoadParentFramePointer();
631 609
632 // checked-load heap, index, length 610 // checked-load heap, index, length
633 const Operator* CheckedLoad(CheckedLoadRepresentation); 611 const Operator* CheckedLoad(CheckedLoadRepresentation);
634 // checked-store heap, index, length, value 612 // checked-store heap, index, length, value
635 const Operator* CheckedStore(CheckedStoreRepresentation); 613 const Operator* CheckedStore(CheckedStoreRepresentation);
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 }; 689 };
712 690
713 691
714 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags) 692 DEFINE_OPERATORS_FOR_FLAGS(MachineOperatorBuilder::Flags)
715 693
716 } // namespace compiler 694 } // namespace compiler
717 } // namespace internal 695 } // namespace internal
718 } // namespace v8 696 } // namespace v8
719 697
720 #endif // V8_COMPILER_MACHINE_OPERATOR_H_ 698 #endif // V8_COMPILER_MACHINE_OPERATOR_H_
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/machine-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698