We have a prototype implementation of a Hybrid Thumb2-ARM backend in V8 
with the aim to reduce the code space (useful for lower end devices with 
less memory) and also improve performance through better I-cache 
performance. At this point we have a working solution on a slightly older 
V8 version (3.16) and see about 10% to 12% code size reduction compared to 
the pure ARM mode and we are also seeing performance gains on Octane and 
Kraken on Snapdragon devices. Some subtests in Octane are showing 5+% 
performance gains together with 10+% code size reduction. We are planning 
to integrate all the changes on the bleeding-edge. 

We added Thumb2 support in the assembler and made code generator changes to 
dynamically select between T16 or T32 instructions based on the allowed 
constraints. Additionally, we have implemented various changes at the 
higher layers of the code generator to make the constraints favorable to 
emit T16 instructions before we are forced to emit a T32 instruction. The 
code generator is Hybrid because at the function level granularity we can 
decide to either JIT ARM-mode code or Thumb2 mode code, and also 
automatically detect the mode changes needed. Since Crankshaft code is 
mostly bloated, we have now configured Crankshaft code to be Thumb2 and 
Full compiler generated code to be  ARM mode. However we can extend this to 
have certain Crankshaft code in ARM mode and others in Thumb2 mode, or when 
de-optimized the next re-optimization can be in a different mode for the 
same function in Crankshaft.

Meanwhile we recently noted an independent github project for a Thumb2 
backend for V8 (https://github.com/veresov/v8-thumb). We haven’t yet seen 
anything in chromium code review or in the V8 SVN repo come up on Thumb2, 
but are there any plans to implement Thumb2 in the open source V8 project? 
If there is an interest we can collaborate on the efforts based on our 
learning through our prototype implementation and we can contribute patches 
that can benefit the Thumb2 work for V8. 

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to