Is GIMPLE stable?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Is GIMPLE stable?

Mateus Carmo Martins de Freitas Barbosa
There's an ongoing discussion on the rustc forum
(<https://users.rust-lang.org/t/call-for-help-implementing-an-independent-rust-frontend-for-gcc/32163>)
on implementing a GCC front-end for the Rust compiler, and the issue
of whether GIMPLE is stable was brought up. Namely, if a compiler
front-end were to output GIMPLE directly, how often (if at all) would
its codebase have to be changed to due to breaking changes from GCC?

I did find this reply
<https://gcc.gnu.org/ml/gcc/2011-05/msg00313.html> which says:

>> ?^ It looks like GIMPLE is expected to change per version of gcc. Is there a time in >> the future when GIMPLE will be pretty stable?
>
> "Pretty stable" won't be enough, and I don't see us arriving there at
> the moment.

But this is fairly old (2011) so it seemed reasonable to ask if this
is still the case.
Reply | Threaded
Open this post in threaded view
|

Re: Is GIMPLE stable?

gcc - Dev mailing list
On Mon, Sep 9, 2019 at 8:09 PM Mateus Carmo Martins de Freitas Barbosa
<[hidden email]> wrote:

>
> There's an ongoing discussion on the rustc forum
> (<https://users.rust-lang.org/t/call-for-help-implementing-an-independent-rust-frontend-for-gcc/32163>)
> on implementing a GCC front-end for the Rust compiler, and the issue
> of whether GIMPLE is stable was brought up. Namely, if a compiler
> front-end were to output GIMPLE directly, how often (if at all) would
> its codebase have to be changed to due to breaking changes from GCC?
>
> I did find this reply
> <https://gcc.gnu.org/ml/gcc/2011-05/msg00313.html> which says:
>
> >> ?^ It looks like GIMPLE is expected to change per version of gcc. Is there a time in >> the future when GIMPLE will be pretty stable?
> >
> > "Pretty stable" won't be enough, and I don't see us arriving there at
> > the moment.
>
> But this is fairly old (2011) so it seemed reasonable to ask if this
> is still the case.

GIMPLE is fairly stable but not 100% stable.  The way the Go frontend
handles this is that the file that converts between the Go frontend IR
and GIMPLE is part of the GCC tree (gcc/go/go-gcc.cc).  This file is
then routinely updated whenever three is a tree-wide GIMPLE change.
With that approach I very rarely have to change the GIMPLE generation
code myself.

Ian