public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Haley <aph@redhat.com>
To: Roger Sayle <roger@nextmovesoftware.com>,
	       Andrew Hughes <gnu.andrew@redhat.com>
Cc: java-patches@gcc.gnu.org
Subject: Re: [JAVA PATCH] Enable more array bounds check elimination
Date: Wed, 24 Feb 2016 09:53:00 -0000	[thread overview]
Message-ID: <56CD7D99.1040703@redhat.com> (raw)
In-Reply-To: <BF72AE9E-E0F5-44A0-8847-9BCB2A0CD0E8@nextmovesoftware.com>

On 24/02/16 01:11, Roger Sayle wrote:
> 
> Following the thread above, there seems to be an unclear lack of
> distinction between different aspects and roles of GCJ, that I hope
> you can clear up.
> 
> I completely agree that maintaining libjava/classpath has been a
> pain, tracking a continual moving target of a huge API, and now
> obsolete thanks to OpenJDK and IcedTea.  But what I'm interested in
> is the Free Software Foundation's ahead-of-time compiler for
> transforming Java bytecodes/class files to binary executables,
> i.e. jc1.
> 
> My understanding is that the JVM bytecode instruction set has been
> relatively stable over the ages, and that "gcj" compiles the
> contents of most modern class files without problems, it's only the
> run-time library support that hasn't kept pace with the times.
> 
> Is there any reason why gcj 7.x couldn't/doesn't use OpenJDK as its
> runtime library?

Yes.  It's important to realize that, while bytecodes are added very
infrequently, new entry points to the virtual machine are added
frequently.  Some of these are simply optimizations, but many are
needed for correct operation.  GCJ has never supported any of the
entry points required by the OpenJDK class library.

> When a better open source front-end came along (ecj), gcj switched
> to using that to reduce the overhead of tracking syntax changes to
> the Java language.  Now that a better run-time library exists,
> reducing the overhead of tracking library API changes, it seems odd
> not to switch to it, but to instead end-of-life the ahead of time
> compiler, specifically the translation to gimple front-end.

It's a lot of work, and the work gets greater with every day that
passes.  A couple of years ago I guesstimated the work that would be
involved, and I reckoned it would be at least six months, and that's
six months for me.  Nobody could do it any faster.  Now it's much
longer, more than a year.  I would love to reactivate GCJ with a
modern class library, but I can't figure out any way to justify the
time.

The other point is that it would be unsatisfying.  OpenJDK's
optimizers do many optimizations which can't be done with any
ahead-of-time compiler, so GCJ would always fall behind.

Andrew.

  parent reply	other threads:[~2016-02-24  9:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-22 23:02 Roger Sayle
2016-02-23  9:56 ` Andrew Haley
2016-02-23 17:45   ` Andrew Hughes
2016-02-24  1:11     ` Roger Sayle
2016-02-24  3:23       ` Andrew Hughes
2016-02-24  9:53       ` Andrew Haley [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-02-22 18:10 roger
2016-02-22 18:13 ` Andrew Haley
2016-02-22 18:18 ` Jeff Law
2016-07-13 20:07 ` Jeff Law
2016-07-14 17:12   ` Andrew Hughes
2016-07-14 17:43     ` Andrew Haley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56CD7D99.1040703@redhat.com \
    --to=aph@redhat.com \
    --cc=gnu.andrew@redhat.com \
    --cc=java-patches@gcc.gnu.org \
    --cc=roger@nextmovesoftware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).