Bug 190264

Summary: [BigInt] Implement ValueBitXor into DFG
Product: WebKit Reporter: Caio Lima <ticaiolima>
Component: JavaScriptCoreAssignee: Caio Lima <ticaiolima>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ews-watchlist, keith_miller, mark.lam, msaboff, saam, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 186235    
Bug Blocks: 186173    
Attachments:
Description Flags
WIP - Patch
none
WIP - Patch
none
WIP - Patch
none
Patch
none
Patch
none
Benchmarks
none
Patch
none
Patch
none
Patch
none
Benchmarks
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Description Caio Lima 2018-10-03 14:58:50 PDT
...
Comment 1 Caio Lima 2018-10-06 08:27:15 PDT
Created attachment 351727 [details]
WIP - Patch
Comment 2 Caio Lima 2018-10-06 11:52:11 PDT
Created attachment 351730 [details]
WIP - Patch

Patch doesn't compile.
Comment 3 Caio Lima 2018-10-09 19:49:24 PDT
Created attachment 351934 [details]
WIP - Patch
Comment 4 Caio Lima 2018-10-21 18:48:51 PDT
Created attachment 352878 [details]
Patch
Comment 5 Caio Lima 2018-10-21 20:05:44 PDT
Created attachment 352880 [details]
Patch
Comment 6 Caio Lima 2018-10-22 04:55:14 PDT
Created attachment 352885 [details]
Benchmarks

Changes are perf neutral.
Comment 7 Caio Lima 2018-10-31 18:54:30 PDT
Created attachment 353569 [details]
Patch
Comment 8 Caio Lima 2018-10-31 19:04:06 PDT
Created attachment 353570 [details]
Patch
Comment 9 Caio Lima 2018-11-01 04:41:53 PDT
Comment on attachment 353570 [details]
Patch

Investigating performance regression
Comment 10 Caio Lima 2018-11-01 09:49:23 PDT
Created attachment 353609 [details]
Patch
Comment 11 Caio Lima 2018-11-01 09:50:56 PDT
Created attachment 353611 [details]
Benchmarks

This patch is perf neutral.
Comment 12 Caio Lima 2018-11-05 06:03:48 PST
Ping Review
Comment 13 Caio Lima 2018-11-08 06:15:55 PST
Created attachment 354235 [details]
Patch
Comment 14 EWS Watchlist 2018-11-08 07:43:09 PST
Comment on attachment 354235 [details]
Patch

Attachment 354235 [details] did not pass jsc-ews (mac):
Output: https://webkit-queues.webkit.org/results/9908802

New failing tests:
stress/ftl-put-by-id-setter-exception.js.dfg-eager-no-cjit-validate
apiTests
Comment 15 Caio Lima 2018-11-12 07:59:56 PST
Created attachment 354559 [details]
Patch
Comment 16 Caio Lima 2018-11-13 10:41:52 PST
Created attachment 354681 [details]
Patch
Comment 17 Caio Lima 2018-11-14 08:47:07 PST
Created attachment 354813 [details]
Patch
Comment 18 Caio Lima 2018-11-18 16:22:45 PST
Created attachment 355243 [details]
Patch
Comment 19 Caio Lima 2018-11-19 16:32:35 PST
Ping review
Comment 20 Caio Lima 2018-11-26 03:11:59 PST
Created attachment 355629 [details]
Patch
Comment 21 Caio Lima 2018-11-26 03:21:59 PST
Created attachment 355630 [details]
Patch
Comment 22 Caio Lima 2018-11-28 04:47:05 PST
Created attachment 355863 [details]
Patch
Comment 23 Yusuke Suzuki 2018-11-29 17:53:17 PST
Comment on attachment 355863 [details]
Patch

r=me
Comment 24 WebKit Commit Bot 2018-11-30 05:25:01 PST
Comment on attachment 355863 [details]
Patch

Clearing flags on attachment: 355863

Committed r238732: <https://trac.webkit.org/changeset/238732>
Comment 25 WebKit Commit Bot 2018-11-30 05:25:03 PST
All reviewed patches have been landed.  Closing bug.
Comment 26 Radar WebKit Bug Importer 2018-11-30 05:26:39 PST
<rdar://problem/46371247>
Comment 27 Saam Barati 2019-01-20 13:03:40 PST
Comment on attachment 355863 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=355863&action=review

> Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:398
> +    case ValueBitXor:
>      case ValueBitAnd:
> +    case ValueBitOr:

Can we add constant folding for this in the future if the inputs are constant?

> Source/JavaScriptCore/dfg/DFGFixupPhase.cpp:167
> +                case ArithBitXor:
> +                    node->setOpAndDefaultFlags(ValueBitXor);
> +                    break;

Did we end up switching this back to be the opposite direction? First emit ValueBitXor, then optimize to ArithBitXor.