* Can gcj be a Java front-end for llvm as well?
@ 2009-10-16 20:18 Yuri
2009-10-17 10:11 ` Mark Wielaard
0 siblings, 1 reply; 3+ messages in thread
From: Yuri @ 2009-10-16 20:18 UTC (permalink / raw)
To: java
When I look at GCJ I see that it's a very powerful technology,
generating gcc memory structures to represent code in the end and using
gcc mechanism to write final binary objects.
Since most work that GCJ does isn't directly related to the rest of gcc,
it seems to be possible to have the code generation phase have two
options: gcc and llvm. So it can be a Java frontend for llvm compiler as
well.
The rationale for this is that llvm in many cases produces more optimal
code and it's good to have such option if it doesn't come at too high price.
Does this suggestion seem reasonable?
Yuri
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Can gcj be a Java front-end for llvm as well?
2009-10-16 20:18 Can gcj be a Java front-end for llvm as well? Yuri
@ 2009-10-17 10:11 ` Mark Wielaard
2009-10-18 22:15 ` Yuri
0 siblings, 1 reply; 3+ messages in thread
From: Mark Wielaard @ 2009-10-17 10:11 UTC (permalink / raw)
To: yuri; +Cc: java
On Fri, 2009-10-16 at 13:18 -0700, Yuri wrote:
> The rationale for this is that llvm in many cases produces more optimal
> code and it's good to have such option if it doesn't come at too high price.
When gcj/gcc produces sub-optimal code wouldn't it make more sense to
just fix gcj? Can you give some examples of such code?
Thanks,
Mark
P.S. There is http://vmkit.llvm.org/ladyvm.html if you need to use
llvm/vmkit. It might not produce the fastest runtime code, but it is a
quick way to mix and match various existing free software projects to
produce something gcj/java-like.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Can gcj be a Java front-end for llvm as well?
2009-10-17 10:11 ` Mark Wielaard
@ 2009-10-18 22:15 ` Yuri
0 siblings, 0 replies; 3+ messages in thread
From: Yuri @ 2009-10-18 22:15 UTC (permalink / raw)
To: Mark Wielaard; +Cc: java
Mark Wielaard wrote:
> When gcj/gcc produces sub-optimal code wouldn't it make more sense to
> just fix gcj? Can you give some examples of such code?
>
It does make sense to fix gcj and gcc.
However, since gcj only connects to gcc for code generation, it can also
serve as a java frontend for llvm.
llvm obviously needs Java frontend (just like frontends for other common
languages). And why to redevelop it from scratch, if gcj is almost a
perfect fit?
I can't give a particular example of performance here now. But pretty
much every time when I compiled large (c++) project with llvm I got
better runtime compared to gcc. Usually 10-20%.
I don't try to put blame on gcc here. I am just saying that the more
uses gcj finds the better.
Yuri
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-10-18 22:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-16 20:18 Can gcj be a Java front-end for llvm as well? Yuri
2009-10-17 10:11 ` Mark Wielaard
2009-10-18 22:15 ` Yuri
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).