Changeset 235515 in webkit
- Timestamp:
- Aug 30, 2018, 12:27:56 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
-
JSTests/ChangeLog (modified) (1 diff)
-
JSTests/microbenchmarks/dataview-cse.js (added)
-
JSTests/stress/dataview-get-cse.js (added)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/dfg/DFGClobberize.h (modified) (1 diff)
-
Source/JavaScriptCore/dfg/DFGFixupPhase.cpp (modified) (1 diff)
-
Source/JavaScriptCore/dfg/DFGHeapLocation.cpp (modified) (1 diff)
-
Source/JavaScriptCore/dfg/DFGHeapLocation.h (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r235514 r235515 1 2018-08-30 Saam barati <sbarati@apple.com> 2 3 CSE DataViewGet* DFG nodes 4 https://bugs.webkit.org/show_bug.cgi?id=188768 5 6 Reviewed by Yusuke Suzuki. 7 8 * microbenchmarks/dataview-cse.js: Added. 9 (assert): 10 (test): 11 * stress/dataview-get-cse.js: Added. 12 (assert): 13 (test1.foo): 14 (test1): 15 (test2.foo): 16 (test2): 17 (test3.foo): 18 (test3): 19 (test4.foo): 20 (test4): 21 (test5.foo): 22 (test5): 23 (test6.foo): 24 (test6): 25 1 26 2018-08-30 Yusuke Suzuki <yusukesuzuki@slowstart.org> 2 27 -
trunk/Source/JavaScriptCore/ChangeLog
r235514 r235515 1 2018-08-30 Saam barati <sbarati@apple.com> 2 3 CSE DataViewGet* DFG nodes 4 https://bugs.webkit.org/show_bug.cgi?id=188768 5 6 Reviewed by Yusuke Suzuki. 7 8 This patch makes it so that we CSE DataViewGet* accesses. To do this, 9 I needed to add a third descriptor to HeapLocation to represent the 10 isLittleEndian child. This patch is neutral on compile time benchmarks, 11 and is a 50% speedup on a trivial CSE microbenchmark that I added. 12 13 * dfg/DFGClobberize.h: 14 (JSC::DFG::clobberize): 15 * dfg/DFGFixupPhase.cpp: 16 (JSC::DFG::FixupPhase::fixupNode): 17 * dfg/DFGHeapLocation.cpp: 18 (WTF::printInternal): 19 * dfg/DFGHeapLocation.h: 20 (JSC::DFG::HeapLocation::HeapLocation): 21 (JSC::DFG::HeapLocation::hash const): 22 (JSC::DFG::HeapLocation::operator== const): 23 (JSC::DFG::indexedPropertyLocForResultType): 24 1 25 2018-08-30 Yusuke Suzuki <yusukesuzuki@slowstart.org> 2 26 -
trunk/Source/JavaScriptCore/dfg/DFGClobberize.h
r235106 r235515 1764 1764 read(MiscFields); 1765 1765 read(TypedArrayProperties); 1766 LocationKind indexedPropertyLoc = indexedPropertyLocForResultType(node->result()); 1767 def(HeapLocation(indexedPropertyLoc, AbstractHeap(TypedArrayProperties, node->dataViewData().asQuadWord), 1768 node->child1(), node->child2(), node->child3()), LazyNode(node)); 1766 1769 return; 1767 1770 } -
trunk/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
r235106 r235515 2120 2120 break; 2121 2121 case 4: 2122 if (data.isSigned) 2122 if (data.isSigned) 2123 2123 node->setResult(NodeResultInt32); 2124 2124 else -
trunk/Source/JavaScriptCore/dfg/DFGHeapLocation.cpp
r231871 r235515 133 133 return; 134 134 135 case IndexedPropertyInt32Loc: 136 out.print("IndexedPropertyInt32Loc"); 137 return; 138 135 139 case IndexedPropertyInt52Loc: 136 140 out.print("IndexedPropertyInt52Loc"); -
trunk/Source/JavaScriptCore/dfg/DFGHeapLocation.h
r231871 r235515 50 50 IndexedPropertyDoubleLoc, 51 51 IndexedPropertyDoubleSaneChainLoc, 52 IndexedPropertyInt32Loc, 52 53 IndexedPropertyInt52Loc, 53 54 IndexedPropertyJSLoc, … … 78 79 LocationKind kind = InvalidLocationKind, 79 80 AbstractHeap heap = AbstractHeap(), 80 Node* base = nullptr, LazyNode index = LazyNode() )81 Node* base = nullptr, LazyNode index = LazyNode(), Node* descriptor = nullptr) 81 82 : m_kind(kind) 82 83 , m_heap(heap) 83 84 , m_base(base) 84 85 , m_index(index) 86 , m_descriptor(descriptor) 85 87 { 86 88 ASSERT((kind == InvalidLocationKind) == !heap); 87 89 ASSERT(!!m_heap || !m_base); 88 ASSERT(m_base || !m_index);90 ASSERT(m_base || (!m_index && !m_descriptor)); 89 91 } 90 92 91 HeapLocation(LocationKind kind, AbstractHeap heap, Node* base, Node* index )92 : HeapLocation(kind, heap, base, LazyNode(index) )93 HeapLocation(LocationKind kind, AbstractHeap heap, Node* base, Node* index, Node* descriptor = nullptr) 94 : HeapLocation(kind, heap, base, LazyNode(index), descriptor) 93 95 { 94 96 } 95 97 96 HeapLocation(LocationKind kind, AbstractHeap heap, Edge base, Edge index = Edge() )97 : HeapLocation(kind, heap, base.node(), index.node() )98 HeapLocation(LocationKind kind, AbstractHeap heap, Edge base, Edge index = Edge(), Edge descriptor = Edge()) 99 : HeapLocation(kind, heap, base.node(), index.node(), descriptor.node()) 98 100 { 99 101 } … … 104 106 , m_base(nullptr) 105 107 , m_index(nullptr) 108 , m_descriptor(nullptr) 106 109 { 107 110 } … … 116 119 unsigned hash() const 117 120 { 118 return m_kind + m_heap.hash() + m_index.hash() + m_kind;121 return m_kind + m_heap.hash() + m_index.hash() + static_cast<unsigned>(bitwise_cast<uintptr_t>(m_base)) + static_cast<unsigned>(bitwise_cast<uintptr_t>(m_descriptor)); 119 122 } 120 123 … … 124 127 && m_heap == other.m_heap 125 128 && m_base == other.m_base 126 && m_index == other.m_index; 129 && m_index == other.m_index 130 && m_descriptor == other.m_descriptor; 127 131 } 128 132 … … 139 143 Node* m_base; 140 144 LazyNode m_index; 145 Node* m_descriptor; 141 146 }; 142 147 … … 160 165 case NodeResultInt52: 161 166 return IndexedPropertyInt52Loc; 167 case NodeResultInt32: 168 return IndexedPropertyInt32Loc; 162 169 case NodeResultJS: 163 170 return IndexedPropertyJSLoc;
Note:
See TracChangeset
for help on using the changeset viewer.