System.arraycopy
Deneau, Tom
tom.deneau at amd.com
Thu Jun 5 23:28:37 UTC 2014
Using -G:-CallArrayCopy seemed to work...
> -----Original Message-----
> From: Tom Rodriguez [mailto:tom.rodriguez at oracle.com]
> Sent: Thursday, June 05, 2014 4:44 PM
> To: Deneau, Tom
> Cc: Chris Thalinger; graal-dev at openjdk.java.net
> Subject: Re: System.arraycopy
>
>
> On Jun 5, 2014, at 2:39 PM, Deneau, Tom <tom.deneau at amd.com> wrote:
>
> > Christian --
> >
> > For now just going for functionally correct, will address performance
> issues in the future. But yes there are vector instructions that could
> help even in a single workitem.
> >
> > Is there already a pure java implementation of System.arrayCopy we
> could substitute?
>
> UnsafeArrayCopyNode is pretty much that. The flag CallArrayCopy
> controls whether it prefers the hotspot stubs for array copy or not but
> it should be able to fall back to UnsafeArrayCopyNode.
>
> tom
>
> >
> > I guess we would want to use the logic to do different substitutions
> based on the type of the array (like in ArrayCopySnippets)?
> >
> > any other advice for implementing this?
> >
> > -- Tom
> >
> >
> >
> >> -----Original Message-----
> >> From: Christian Thalinger [mailto:christian.thalinger at oracle.com]
> >> Sent: Thursday, June 05, 2014 3:45 PM
> >> To: Deneau, Tom
> >> Cc: graal-dev at openjdk.java.net
> >> Subject: Re: System.arraycopy
> >>
> >> Well, I guess the easiest but maybe not most performant way would be
> >> to have a substitution and implement it in plain Java.
> >>
> >> On the other hand you could rely on vectorization and the power of
> >> GPUs to produce good, parallel code :-)
> >>
> >> On Jun 5, 2014, at 1:29 PM, Deneau, Tom <tom.deneau at amd.com> wrote:
> >>
> >>> Since we cannot handle "foreign calls" in the hsail backend, what is
> >> the preferred way to implement System.arraycopy? Right now, we are
> >> deferring to the host and so getting an ArrayCopyCallNode which gets
> >> lowered to a graph containing a ForeignCallNode.
> >>>
> >>> I confess to being a little confused with the ArrayCopyNode and
> >> Snippets, UnsafeArrayCopyNode and Snippets, ArrayCopyCallNode, etc.
> >>>
> >>> -- Tom
> >>>
> >
More information about the graal-dev
mailing list