JDK-6559557 : Support for vector instructions in bytecode
  • Type: Enhancement
  • Component: specification
  • Sub-Component: vm
  • Affected Version: 7
  • Priority: P5
  • Status: Closed
  • Resolution: Won't Fix
  • OS: linux
  • CPU: x86
  • Submitted: 2007-05-18
  • Updated: 2012-10-09
  • Resolved: 2007-07-10
Related Reports
Relates :  
Relates :  
Description
A DESCRIPTION OF THE REQUEST :
Insert support for instruction(s) in the bytecode which describe parallelism. For example instructions which specify the next instructions to be performed 2 , 4, 8 , 16 etc times for data in parallel registers. These instructions should be designed so that they can be serialized easily for platforms and JVMs which dont support parallelism.

For example a paralled add would be:

(do 4 times) (add registers 1 and 2 to register 1) which would result in a parallel add of 1 and 2 to 1, 3 and 4 to 3 , 5 and 6 to 5 and 7 and 8 to 7. This could be serialized as four common adds for JITs and JVMs which dont want to implement the actual parallel version.

This parallel prefix could be applied to multiply loads, stores, addition, multiplication, division etc.

JUSTIFICATION :
This would allow compilers to pass knowledge of parallelism to the bytecode level , which would make it easier for JVMs and JITs to implement platform specific optimizations for the common parallel cases without worrying about analysis of parallelism. This would make it possible to compile parallel constructs in java or any other language to SIMDish bytecode, and then get the SIMD advantage on any supporting platform while maintaining ease of implementation and backwards compatibility on other platforms.

Comments
EVALUATION It would be interesting to hint to the runtime that bytecode can be parallelised, but this is not an RFE. It is a research project followed by a JSR.
21-05-2007