Diff
Deleted: trunk/PerformanceTests/BigIntBench/big-int-cse.js (239434 => 239435)
--- trunk/PerformanceTests/BigIntBench/big-int-cse.js 2018-12-20 07:01:36 UTC (rev 239434)
+++ trunk/PerformanceTests/BigIntBench/big-int-cse.js 2018-12-20 07:36:00 UTC (rev 239435)
@@ -1,103 +0,0 @@
-function assert(a, e) {
- if (a !== e)
- throw new Error("Expected " + e + " but got: " + a);
-}
-
-function bigIntAdd(a, b) {
- let c = a + b;
- return b + a + c;
-}
-noInline(bigIntAdd);
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntAdd(3n, 5n), 16n);
-}
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntAdd(0xffffffffffffffffffn, 0xaaffffffffffffffffffn), 1624494070107157953511420n);
-}
-
-function bigIntMul(a, b) {
- let c = a * b;
- return b * a + c;
-}
-noInline(bigIntMul);
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntMul(3n, 5n), 30n);
-}
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntMul(0xffffffffffffffffffn, 0xaaffffffffffffffffffn), 7626854857897473114403591155175632477091790850n);
-}
-
-function bigIntDiv(a, b) {
- let c = a / b;
- return a / b + c;
-}
-noInline(bigIntDiv);
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntDiv(15n, 5n), 6n);
-}
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntDiv(0xaaffffffffffffffffffn, 0xffffffffffffffffffn), 342n);
-}
-
-function bigIntSub(a, b) {
- let c = a - b;
- return a - b + c;
-}
-noInline(bigIntSub);
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntSub(15n, 5n), 20n);
-}
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntSub(0xaaffffffffffffffffffn, 0xffffffffffffffffffn), 1605604604175679372656640n);
-}
-
-function bigIntBitOr(a, b) {
- let c = a | b;
- return (b | a) + c;
-}
-noInline(bigIntBitOr);
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntBitOr(0b1101n, 0b0010n), 30n);
-}
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntBitOr(0xaaffffffffffffffffffn, 0xffffffffffffffffffn), 1615049337141418663084030n);
-}
-
-function bigIntBitAnd(a, b) {
- let c = a & b;
- return (b & a) + c;
-}
-noInline(bigIntBitAnd);
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntBitAnd(0b1101n, 0b0010n), 0n);
-}
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntBitAnd(0xaaffffffffffffffffffn, 0xffffffffffffffffffn), 9444732965739290427390n);
-}
-
-function bigIntBitXor(a, b) {
- let c = a ^ b;
- return (b ^ a) + c;
-}
-noInline(bigIntBitXor);
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntBitXor(0b1101n, 0b0010n), 30n);
-}
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntBitXor(0xaaffffffffffffffffffn, 0xffffffffffffffffffn), 1605604604175679372656640n);
-}
-
Deleted: trunk/PerformanceTests/BigIntBench/big-int-global-cse.js (239434 => 239435)
--- trunk/PerformanceTests/BigIntBench/big-int-global-cse.js 2018-12-20 07:01:36 UTC (rev 239434)
+++ trunk/PerformanceTests/BigIntBench/big-int-global-cse.js 2018-12-20 07:36:00 UTC (rev 239435)
@@ -1,124 +0,0 @@
-function assert(a, e) {
- if (a !== e)
- throw new Error("Expected " + e + " but got: " + a);
-}
-
-function bigIntAdd(a, b) {
- let c = a + b;
- if (b) {
- assert(c, a + b);
- }
- return a + b + c;
-}
-noInline(bigIntAdd);
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntAdd(3n, 5n), 16n);
-}
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntAdd(0xffffffffffffffffffn, 0xaaffffffffffffffffffn), 1624494070107157953511420n);
-}
-
-function bigIntMul(a, b) {
- let c = a * b;
- if (b) {
- assert(c, a * b);
- }
- return a * b + c;
-}
-noInline(bigIntMul);
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntMul(3n, 5n), 30n);
-}
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntMul(0xffffffffffffffffffn, 0xaaffffffffffffffffffn), 7626854857897473114403591155175632477091790850n);
-}
-
-function bigIntDiv(a, b) {
- let c = a / b;
- if (b) {
- assert(c, a / b);
- }
- return a / b + c;
-}
-noInline(bigIntDiv);
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntDiv(15n, 5n), 6n);
-}
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntDiv(0xaaffffffffffffffffffn, 0xffffffffffffffffffn), 342n);
-}
-
-function bigIntSub(a, b) {
- let c = a - b;
- if (b) {
- assert(c, a - b);
- }
- return a - b + c;
-}
-noInline(bigIntSub);
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntSub(15n, 5n), 20n);
-}
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntSub(0xaaffffffffffffffffffn, 0xffffffffffffffffffn), 1605604604175679372656640n);
-}
-
-function bigIntBitOr(a, b) {
- let c = a | b;
- if (b) {
- assert(c, a | b);
- }
- return (a | b) + c;
-}
-noInline(bigIntBitOr);
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntBitOr(0b1101n, 0b0010n), 30n);
-}
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntBitOr(0xaaffffffffffffffffffn, 0xffffffffffffffffffn), 1615049337141418663084030n);
-}
-
-function bigIntBitAnd(a, b) {
- let c = a & b;
- if (b) {
- assert(c, a & b);
- }
- return (a & b) + c;
-}
-noInline(bigIntBitAnd);
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntBitAnd(0b1101n, 0b0010n), 0n);
-}
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntBitAnd(0xaaffffffffffffffffffn, 0xffffffffffffffffffn), 9444732965739290427390n);
-}
-
-function bigIntBitXor(a, b) {
- let c = a ^ b;
- if (b) {
- assert(c, a ^ b);
- }
- return (a ^ b) + c;
-}
-noInline(bigIntBitXor);
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntBitXor(0b1101n, 0b0010n), 30n);
-}
-
-for (let i = 0; i < 100000; i++) {
- assert(bigIntBitXor(0xaaffffffffffffffffffn, 0xffffffffffffffffffn), 1605604604175679372656640n);
-}
-
Deleted: trunk/PerformanceTests/BigIntBench/big-int-licm.js (239434 => 239435)
--- trunk/PerformanceTests/BigIntBench/big-int-licm.js 2018-12-20 07:01:36 UTC (rev 239434)
+++ trunk/PerformanceTests/BigIntBench/big-int-licm.js 2018-12-20 07:36:00 UTC (rev 239435)
@@ -1,19 +0,0 @@
-function assert(a, e) {
- if (a !== e)
- throw new Error("Expected " + e + " but got: " + a);
-}
-
-function iteration(a, b, r) {
- let acc = 0n;
- for (let i = 0n; i < r; i += 1n) {
- acc += a + b;
- }
-
- return acc;
-}
-noInline(iteration);
-
-for (let i = 0; i < 10000; i++) {
- assert(iteration(1n, 2n, 100n), 300n)
-}
-
Modified: trunk/PerformanceTests/ChangeLog (239434 => 239435)
--- trunk/PerformanceTests/ChangeLog 2018-12-20 07:01:36 UTC (rev 239434)
+++ trunk/PerformanceTests/ChangeLog 2018-12-20 07:36:00 UTC (rev 239435)
@@ -1,3 +1,17 @@
+2018-12-19 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r239377.
+ https://bugs.webkit.org/show_bug.cgi?id=192921
+
+ broke 32-bit JSC tests (Requested by keith_miller on #webkit).
+
+ Reverted changeset:
+
+ "[BigInt] We should enable CSE into arithmetic operations that
+ speculate BigIntUse"
+ https://bugs.webkit.org/show_bug.cgi?id=192723
+ https://trac.webkit.org/changeset/239377
+
2018-12-19 Caio Lima <[email protected]>
[BigInt] We should enable CSE into arithmetic operations that speculate BigIntUse
Modified: trunk/Source/_javascript_Core/ChangeLog (239434 => 239435)
--- trunk/Source/_javascript_Core/ChangeLog 2018-12-20 07:01:36 UTC (rev 239434)
+++ trunk/Source/_javascript_Core/ChangeLog 2018-12-20 07:36:00 UTC (rev 239435)
@@ -1,3 +1,17 @@
+2018-12-19 Commit Queue <[email protected]>
+
+ Unreviewed, rolling out r239377.
+ https://bugs.webkit.org/show_bug.cgi?id=192921
+
+ broke 32-bit JSC tests (Requested by keith_miller on #webkit).
+
+ Reverted changeset:
+
+ "[BigInt] We should enable CSE into arithmetic operations that
+ speculate BigIntUse"
+ https://bugs.webkit.org/show_bug.cgi?id=192723
+ https://trac.webkit.org/changeset/239377
+
2018-12-19 Chris Dumez <[email protected]>
wtf/Optional.h: move-constructor and move-assignment operator should disengage the value being moved from
Modified: trunk/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h (239434 => 239435)
--- trunk/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h 2018-12-20 07:01:36 UTC (rev 239434)
+++ trunk/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h 2018-12-20 07:36:00 UTC (rev 239435)
@@ -397,12 +397,11 @@
case ValueBitXor:
case ValueBitAnd:
case ValueBitOr:
+ clobberWorld();
if (node->binaryUseKind() == BigIntUse)
setTypeForNode(node, SpecBigInt);
- else {
- clobberWorld();
+ else
setTypeForNode(node, SpecBoolInt32 | SpecBigInt);
- }
break;
case ArithBitAnd:
@@ -614,12 +613,11 @@
case ValueSub:
case ValueAdd: {
DFG_ASSERT(m_graph, node, node->binaryUseKind() == UntypedUse || node->binaryUseKind() == BigIntUse);
+ clobberWorld();
if (node->binaryUseKind() == BigIntUse)
setTypeForNode(node, SpecBigInt);
- else {
- clobberWorld();
+ else
setTypeForNode(node, SpecString | SpecBytecodeNumber | SpecBigInt);
- }
break;
}
@@ -858,12 +856,11 @@
}
case ValueMul: {
+ clobberWorld();
if (node->binaryUseKind() == BigIntUse)
setTypeForNode(node, SpecBigInt);
- else {
- clobberWorld();
+ else
setTypeForNode(node, SpecBytecodeNumber | SpecBigInt);
- }
break;
}
@@ -918,12 +915,11 @@
}
case ValueDiv: {
+ clobberWorld();
if (node->binaryUseKind() == BigIntUse)
setTypeForNode(node, SpecBigInt);
- else {
- clobberWorld();
+ else
setTypeForNode(node, SpecBytecodeNumber | SpecBigInt);
- }
break;
}
Modified: trunk/Source/_javascript_Core/dfg/DFGClobberize.h (239434 => 239435)
--- trunk/Source/_javascript_Core/dfg/DFGClobberize.h 2018-12-20 07:01:36 UTC (rev 239434)
+++ trunk/Source/_javascript_Core/dfg/DFGClobberize.h 2018-12-20 07:36:00 UTC (rev 239435)
@@ -644,7 +644,14 @@
case InByVal:
case InById:
case HasOwnProperty:
+ case ValueBitAnd:
+ case ValueBitXor:
+ case ValueBitOr:
case ValueNegate:
+ case ValueAdd:
+ case ValueSub:
+ case ValueMul:
+ case ValueDiv:
case SetFunctionName:
case GetDynamicVar:
case PutDynamicVar:
@@ -666,21 +673,6 @@
write(Heap);
return;
- case ValueBitAnd:
- case ValueBitXor:
- case ValueBitOr:
- case ValueAdd:
- case ValueSub:
- case ValueMul:
- case ValueDiv:
- if (node->isBinaryUseKind(BigIntUse)) {
- def(PureValue(node));
- return;
- }
- read(World);
- write(Heap);
- return;
-
case AtomicsAdd:
case AtomicsAnd:
case AtomicsCompareExchange:
Modified: trunk/Source/_javascript_Core/dfg/DFGStrengthReductionPhase.cpp (239434 => 239435)
--- trunk/Source/_javascript_Core/dfg/DFGStrengthReductionPhase.cpp 2018-12-20 07:01:36 UTC (rev 239434)
+++ trunk/Source/_javascript_Core/dfg/DFGStrengthReductionPhase.cpp 2018-12-20 07:36:00 UTC (rev 239435)
@@ -121,15 +121,6 @@
}
break;
- case ValueMul:
- case ValueBitOr:
- case ValueBitAnd:
- case ValueBitXor: {
- if (m_node->binaryUseKind() == BigIntUse)
- handleCommutativity();
- break;
- }
-
case ArithMul: {
handleCommutativity();
Edge& child2 = m_node->child2();
@@ -373,10 +364,6 @@
convertToLazyJSValue(m_node, LazyJSValue::newString(m_graph, builder.toString()));
m_changed = true;
}
-
- if (m_node->binaryUseKind() == BigIntUse)
- handleCommutativity();
-
break;
}