webrev to enable arraycopy support in hsail backend

Deneau, Tom tom.deneau at amd.com
Tue Jun 10 19:11:45 UTC 2014

Christian --

Regarding the HSAIL tests being repurposed for CPU, I think with a little bit of work they could be used to compare say a server compile (C1 or C2) to a graal compile and make sure the results match.  Or is there already a framework for that kind of comparison?
I admit I haven't spent much time looking at the non-hsail tests.

-- Tom

From: Christian Thalinger [mailto:christian.thalinger at oracle.com]
Sent: Tuesday, June 10, 2014 12:27 PM
To: Deneau, Tom
Cc: graal-dev at openjdk.java.net
Subject: Re: webrev to enable arraycopy support in hsail backend


+        // Register the special arraycopy snippet handling

+        // This basically ignores the sense of the CallArrayCopy flag

+        // and always directs to the snippets from UnsafeArrayCopyNode

Can you change this and other comments to multi-line comments?  Otherwise it looks good.

A general question:  HSAIL has a lot of tests.  Is there any way to make them common tests so that they are executed on CPUs and GPUs?

On Jun 10, 2014, at 7:47 AM, Deneau, Tom <tom.deneau at amd.com<mailto:tom.deneau at amd.com>> wrote:

I placed a small webrev up at

The purpose is to allow System.arraycopy (or at least most flavors of it) to be used in hsail kernels.  Note that even if kernels do not use it directly, System.arrayCopy is used in many JDK routines, for example Stringbuilder.append(), ArrayList.get, etc.  One flavor that is not supported yet is for example an Object array copy where the destination is a superclass of the source.

The changes to HSAILHotSpotReplacementsImpl.java is just a way to take the non-foreign-call path (which hsail kernels cannot handle) regardless of the sense of the global flag CallArrayCopy (default true).

The rest of the webrev is either new specific arraycopy tests, or enabling of some tests that were previously ignored because they needed arraycopy support.

-- Tom

More information about the graal-dev mailing list