FixupPhase should be more eager to demote bit math to untyped
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 May 2016 19:41:01 +0000 (19:41 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 16 May 2016 19:41:01 +0000 (19:41 +0000)
commit360884588ffd0e2ce01d91ee94cc14b8a4821e93
tree2a24376b856ef1ec3d482ffcf64a91e72bd9fdcf
parent751e10b3bf7c2e6046185cb5d5e30408325484c1
FixupPhase should be more eager to demote bit math to untyped
https://bugs.webkit.org/show_bug.cgi?id=157746

Reviewed by Mark Lam.
Source/JavaScriptCore:

This just makes the logic for how we fixup bit math match the way we do it in other places.
This doesn't affect performance on any major benchmark but it's a big win on new
microbenchmarks added in this change.

Details:

object-and                                     11.1610+-0.7602     ^      4.8105+-0.1690        ^ definitely 2.3201x faster
object-or                                      11.0845+-0.2487     ^      4.7146+-0.0374        ^ definitely 2.3511x faster
object-xor                                     10.2946+-0.9946     ^      4.7278+-0.0814        ^ definitely 2.1775x faster
object-lshift                                  10.4896+-1.0867     ^      4.7699+-0.0721        ^ definitely 2.1991x faster
object-rshift                                  11.1239+-0.5010     ^      4.7194+-0.0445        ^ definitely 2.3570x faster
object-urshift                                 10.9745+-0.1315     ^      4.7848+-0.0479        ^ definitely 2.2936x faster

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):

LayoutTests:

* js/regress/object-and-expected.txt: Added.
* js/regress/object-and.html: Added.
* js/regress/object-int-and-array-expected.txt: Added.
* js/regress/object-int-and-array.html: Added.
* js/regress/object-lshift-expected.txt: Added.
* js/regress/object-lshift.html: Added.
* js/regress/object-or-expected.txt: Added.
* js/regress/object-or.html: Added.
* js/regress/object-rshift-expected.txt: Added.
* js/regress/object-rshift.html: Added.
* js/regress/object-urshift-expected.txt: Added.
* js/regress/object-urshift.html: Added.
* js/regress/object-xor-expected.txt: Added.
* js/regress/object-xor.html: Added.
* js/regress/script-tests/object-and.js: Added.
(o.valueOf):
* js/regress/script-tests/object-int-and-array.js: Added.
(i.o.valueOf):
* js/regress/script-tests/object-lshift.js: Added.
(o.valueOf):
* js/regress/script-tests/object-or.js: Added.
(o.valueOf):
* js/regress/script-tests/object-rshift.js: Added.
(o.valueOf):
* js/regress/script-tests/object-urshift.js: Added.
(o.valueOf):
* js/regress/script-tests/object-xor.js: Added.
(o.valueOf):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@200958 268f45cc-cd09-0410-ab3c-d52691b4dbfc
24 files changed:
LayoutTests/ChangeLog
LayoutTests/js/regress/object-and-expected.txt [new file with mode: 0644]
LayoutTests/js/regress/object-and.html [new file with mode: 0644]
LayoutTests/js/regress/object-int-and-array-expected.txt [new file with mode: 0644]
LayoutTests/js/regress/object-int-and-array.html [new file with mode: 0644]
LayoutTests/js/regress/object-lshift-expected.txt [new file with mode: 0644]
LayoutTests/js/regress/object-lshift.html [new file with mode: 0644]
LayoutTests/js/regress/object-or-expected.txt [new file with mode: 0644]
LayoutTests/js/regress/object-or.html [new file with mode: 0644]
LayoutTests/js/regress/object-rshift-expected.txt [new file with mode: 0644]
LayoutTests/js/regress/object-rshift.html [new file with mode: 0644]
LayoutTests/js/regress/object-urshift-expected.txt [new file with mode: 0644]
LayoutTests/js/regress/object-urshift.html [new file with mode: 0644]
LayoutTests/js/regress/object-xor-expected.txt [new file with mode: 0644]
LayoutTests/js/regress/object-xor.html [new file with mode: 0644]
LayoutTests/js/regress/script-tests/object-and.js [new file with mode: 0644]
LayoutTests/js/regress/script-tests/object-int-and-array.js [new file with mode: 0644]
LayoutTests/js/regress/script-tests/object-lshift.js [new file with mode: 0644]
LayoutTests/js/regress/script-tests/object-or.js [new file with mode: 0644]
LayoutTests/js/regress/script-tests/object-rshift.js [new file with mode: 0644]
LayoutTests/js/regress/script-tests/object-urshift.js [new file with mode: 0644]
LayoutTests/js/regress/script-tests/object-xor.js [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGFixupPhase.cpp