User: Password:
|
|
Subscribe / Log in / New account

GCC gets a new Optimizer Framework

GCC gets a new Optimizer Framework

Posted May 13, 2004 10:10 UTC (Thu) by rjw (guest, #10415)
Parent article: GCC gets a new Optimizer Framework

I wonder what this will mean for gcj?

Hopefully it will be closer integrated into the mainline, and we could see things like compiling a subset of C/ C++ / fortran to JVM bytecode. AFAIK, at the moment, gcj doesn't use all that much of the same code as the other frontends.

Another interesting area ( for mono folks) would be if this would make an IL backend easier... and maybe even enable Managed C++, ugly as it is..


(Log in to post comments)

GCC gets a new Optimizer Framework

Posted May 13, 2004 17:22 UTC (Thu) by JoeBuck (guest, #2330) [Link]

gcj has been "fully integrated into the mainline" both before and after the switch to tree-ssa.

GCC gets a new Optimizer Framework

Posted May 13, 2004 17:35 UTC (Thu) by Per_Bothner (subscriber, #7375) [Link]

Hopefully [gcj] will be closer integrated into the mainline, and we could see things like compiling a subset of C/ C++ / fortran to JVM bytecode. AFAIK, at the moment, gcj doesn't use all that much of the same code as the other frontends.

The tree-ssa work doesn't change the "integration" of gcj at all - it's as integrated after the tree-ssa merge as it was in 3.4. And it isn't less "integrated" than other languages. It doesn't share code with the C-specific frontends but neither does Fortran.

One way ssa can help gcj is that can make it easier to write high-level optimizers with better knowledge of Java semantics.

Compiling a subset of C/ C++ / Fortran to JVM bytecode is a very hard problem. The logical way to do it is to write a "JVM backend", and so conceptually you'd cross-compile to the JVM. Steve Chamberlain (then) of Transmeta contributed a PicoJava port which has been removed, but it could used as a starting point. Whether something like this would be useful enough to justify the work is a different matter.

I'd be much more interested in "JVM support" for gdb, so it could debug interpreted bytecode.

GCC gets a new Optimizer Framework

Posted May 16, 2004 12:31 UTC (Sun) by khim (subscriber, #9252) [Link]

Is is "less-integrated". When you compile with GCJ to native code it uses the same front-end. But when you want to compile to JVM - it's whole other compiler! Will it be possible to make JVM just another target ? RTL was unusable for this - but what about SSA ?

GCC gets a new Optimizer Framework

Posted May 20, 2004 9:43 UTC (Thu) by rmathew (subscriber, #20961) [Link]

Is is "less-integrated". When you compile with GCJ to native code it uses the same front-end. But when you want to compile to JVM - it's whole other compiler! Will it be possible to make JVM just another target ? RTL was unusable for this - but what about SSA ?

First off, RTL has not gone anywhere after the Tree-SSA merge - it is still there, though no longer where almost all of the optimisations are performed.

Second, the actual front end remains the same whether you are compiling to native code or to a class file containing JVM bytecodes - the difference is that JVM bytecodes are generated straight from the tree representation while native code is generated after the trees are converted to RTL and generic and machine-specific optimisations performed.

The main reason is that the GCC infrastructure does not directly support the notion of generating code for two different backends at the same time and it is not trivial to add support for such a thing.

Another reason is probably political.

GCC gets a new Optimizer Framework

Posted May 2, 2005 23:22 UTC (Mon) by plugwash (subscriber, #29694) [Link]

yeah rms is a "Free" software zealot

how much control does he have over gcc nowadays

notice the way he was advocating self-censorship of code in that discussion linked to

GCC gets a new Optimizer Framework

Posted May 13, 2004 19:14 UTC (Thu) by iabervon (subscriber, #722) [Link]

I wouldn't actually be too surprised if full C99 support were possible on the JVM (with a suitable library, of course). There are some limits on, for example, what you're allowed to do on pointers as integers and turn them back to pointers successfully. It would probably actually be possible to make a conforming implementation of C with type checking, garbage collection, etc., and it might be possible to use the JVM's services to do it.

GCC gets a new Optimizer Framework

Posted May 14, 2004 9:37 UTC (Fri) by rjw (guest, #10415) [Link]

http://www.xwt.org/mips2java/

its definitely possible, and this is one (ugly) starting point.

The jvm is turing complete, obviously.

The big problem is just working out what people are doing with pointers to be able to implement them efficently on the jvm....


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds