Not adding DFG 32bit specialized code as much as possible!

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Not adding DFG 32bit specialized code as much as possible!

Yusuke SUZUKI
Hi, WebKittens, in particular, JSC folks,

Recently I largely removed duplicate 32bit DFG code by unifying the implementation of 32bit and 64bit. Initially, we have separate code for 32bit and 64bit. But as our DFG infrastructure grows, we have fancy DFG features that enables writing unified implementation for 32bit and 64bit. For example, JSValueRegs families offer the way to handle JSValue registers transparently.

Unifying the code significantly reduces the size of DFGSpeculativeJIT32_64.cpp. It reduces maintenance burden. In addition, it finds bugs, for example, 32bit code sometimes lacks the changes done in 64bit code (e.g. mutatorFence). This unification finds and fixes such a bug.

So I suggest not adding code to DFGSpeculativeJIT32_64.cpp as much as possible. We can implement large part of DFG code in 32/64 unified code with our infrastructure. If your 32bit code is slightly different from 64bit code, I believe adding ifdef in DFGSpeculativeJIT.cpp is rather fine. It highlights what our infrastructure is missing to implement it in unified code. And later, such ifdefs will be removed.

Best regards,
Yusuke Suzuki

_______________________________________________
webkit-dev mailing list
[hidden email]
https://lists.webkit.org/mailman/listinfo/webkit-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jsc-dev] Not adding DFG 32bit specialized code as much as possible!

Saam barati-2


> On Apr 12, 2018, at 5:21 AM, Yusuke SUZUKI <[hidden email]> wrote:
>
> Hi, WebKittens, in particular, JSC folks,
>
> Recently I largely removed duplicate 32bit DFG code by unifying the implementation of 32bit and 64bit. Initially, we have separate code for 32bit and 64bit. But as our DFG infrastructure grows, we have fancy DFG features that enables writing unified implementation for 32bit and 64bit. For example, JSValueRegs families offer the way to handle JSValue registers transparently.
>
> Unifying the code significantly reduces the size of DFGSpeculativeJIT32_64.cpp. It reduces maintenance burden. In addition, it finds bugs, for example, 32bit code sometimes lacks the changes done in 64bit code (e.g. mutatorFence). This unification finds and fixes such a bug.
mutatorFence isn’t needed on 32-bit since it doesn’t have the concurrent GC.

>
> So I suggest not adding code to DFGSpeculativeJIT32_64.cpp as much as possible. We can implement large part of DFG code in 32/64 unified code with our infrastructure. If your 32bit code is slightly different from 64bit code, I believe adding ifdef in DFGSpeculativeJIT.cpp is rather fine. It highlights what our infrastructure is missing to implement it in unified code. And later, such ifdefs will be removed.
This seems like a good approach to me.

- Saam
>
> Best regards,
> Yusuke Suzuki
> _______________________________________________
> jsc-dev mailing list
> [hidden email]
> https://lists.webkit.org/mailman/listinfo/jsc-dev
_______________________________________________
webkit-dev mailing list
[hidden email]
https://lists.webkit.org/mailman/listinfo/webkit-dev