graal and jdk8
Gary.Frost at amd.com
Thu Feb 14 09:20:57 PST 2013
Except (of course) for lambdas dispatching to other lambdas.... :)
From: Thomas Wuerthinger [mailto:thomas.wuerthinger at oracle.com]
Sent: Thursday, February 14, 2013 11:10 AM
To: Bharadwaj Yadavalli
Cc: Frost, Gary; graal-dev at openjdk.java.net
Subject: Re: graal and jdk8
You are right, it does not matter whether you compile Graal with JDK7 or JDK8. Atm, it does not compile the invokedynamic instruction (but bailout). However, I believe that this should not matter in the context of project Sumatra as the lambda expression themselves should not contain this bytecode (and this is the only part that would be given to the Graal compiler).
On Feb 14, 2013, at 8:24 AM, Bharadwaj Yadavalli <bharadwaj.yadavalli at oracle.com> wrote:
> On 2/14/2013 10:58 AM, Frost, Gary wrote:
>> The Sumatra project is interested in intercepting some of the upcoming Java 8 stream API features.
>> Essentially we see the
>> IntStream.parallel().forEach( lambda );
>> As low hanging fruit for GPU acceleration.
> Yes, I understand this and am fully in agreement (It is in line with my post back in November '12 on Sumatra project mailing list http://mail.openjdk.java.net/pipermail/sumatra-dev/2012-November/000045.html).
> I am trying to figure out the various compilation steps in Hotspot/Graal framework that would allow me to recognize opportunities for code generation for alternate architectures (GPUs in this case).
>> So it is important for us to ensure that Graal was (will be) Java 8
>> compatible moving forward, we are delighted that it seems to be ;)
> The question was why does it matter whether we use JDK 7 or JDK 8 to build the (Graal) compiler that in turn could compile Java 8 classfiles. I am not objecting to compiling Graal with the latest JDK, but wish to understand the dependency, which I do not see.
>> It is true that the lambda features seem to leverage only Java 7 classfile features at this time (method handles and constant pool enhancements) so we felt fairly comfortable experimenting with Graal on Java 7. But prefer to continue our experiments with the Project Lambda and Java 8 hotspot VMs.
>> -----Original Message-----
>> From:graal-dev-bounces at openjdk.java.net
>> [mailto:graal-dev-bounces at openjdk.java.net] On Behalf Of Bharadwaj
>> Sent: Thursday, February 14, 2013 9:36 AM
>> To:graal-dev at openjdk.java.net
>> Subject: Re: graal and jdk8
>> On 2/13/2013 12:03 PM, Venkatachalam, Vasanth wrote:
>>> I noticed that I had to use a JDK7 VM to build Graal.
>>> I wasn't able to build it with JDK8. Is there a workaround for this, or does Graal require a JDK7 host VM?
>> I am curious as to why Graal *build* needs to be done with JDK8 so that the resulting Graal compiler would be able to compile Java 8 class files? I believe Graal sources themselves do not (yet) use Java 8 features.
>>> If Graal only supports JDK7, are there plans to make it compatible with JDK8?
>>> We're looking to leverage Graal for the Sumatra project
>>> This work requires being able to compile JDK8 lambda constructs for the GPU.
>> However, it appears to me that the need is more for bringing in the ability to parse and verify Java 8 class files (along with possibly the support for indy, what else am I missing?) so that the Graal compiler has the ability to compile Java 8 class files.
More information about the graal-dev