using Graal for a dual-ISA prototype

Thomas Wuerthinger thomas.wuerthinger at oracle.com
Wed Feb 13 21:55:08 PST 2013


Vasanth,

We will be able to actively support you in the necessary changes to Graal. This means that we should discuss the requirements for the new ISA. Most of our developers are also on the sumatra-dev mailing list. The current ISA abstractions for Graal are built for abstracting different CPU architectures. However, the modifications to also support GPU architectures seem small.

Ideally, a new ISA is created by implementing a new LIR (low-level intermediate representation) for this ISA. You can take a look at all classes in the package "com.oracle.graal.lir.amd64". In particular subclasses of LIRInstruction. Such a low-level instruction specifies its input operands (e.g., register, stack, constant) and also the values it produces. We do no more optimizations on this LIR. It is only used as input for the linear scan register allocator and then given to the code generator for producing the assembly that is later installed in the HotSpot code cache (method HotSpotRuntime.installMethod).

We could discuss in more detail over Skype.

- thomas

On Feb 13, 2013, at 3:10 PM, "Venkatachalam, Vasanth" <Vasanth.Venkatachalam at amd.com> wrote:

> Hi,
> 
> I posted this question on the Sumatra mailing list, but wanted to raise it here to get a perspective on the Graal technical issues involved.
> 
> 
> As part of the Sumatra project, we would like to leverage Graal to develop a dual-ISA prototype Hotspot JVM  that supports GPU code generation.
> 
> 
> 
> http://openjdk.java.net/projects/sumatra/
> 
> 
> 
> The way we envision this working is that the Hotspot Server JVM will x86-compile the routines that are meant to execute on the CPU (which constitute the majority of code), while Graal will intercept and generate GPU-specific code for the few routines (namely JDK8 lambda routines marked as parallel) that need to execute on the GPU.
> 
> 
> 
> We thought this approach would lead to a faster prototype and allow us to retain most of Hotspot's existing functionality, versus the riskier approach of writing an entire Hotspot C2 backend (.ad files and all)  from scratch.
> 
> Clearly this work would require adding a new ISA to Graal (for GPU compilation) but retaining the existing Hotspot x86 compiler (in src/), which comes with the Graal kit.
> 
> 
> 
> Does anyone have feedback on the Graal/Hotspot files we should start looking to better understand the magnitude of this change?
> 
> 
> 
> Vasanth
> 
> 
> 



More information about the graal-dev mailing list