Re: Moving code generation from gcc 4.3.0 to gcc 12?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you, Segher.

One thing that might be helpful would be, as I read the current "GNU
Compiler Collection Internals
For gcc version 14.0.0 (pre-release)", to compare it with the version of
the same document that was relevant for 4.3.0.  Do you know where I might
learn which version is appropriate, and where I might find it?  (
https://gcc.gnu.org/onlinedocs/ only seems to have the current version.)

-+- Sid

On Mon, Jul 10, 2023 at 1:15 PM Segher Boessenkool <
segher@xxxxxxxxxxxxxxxxxxx> wrote:

> Hi!
>
> On Mon, Jul 10, 2023 at 08:57:50AM -0400, Sid Maxwell via Gcc-help wrote:
> > I'm exploring updating a compiler built against the GCC 4.3.0 codebase to
> > (likely) GCC 12.3.  Is there any documentation regarding API changes
> > between these versions affecting the machine description (.md) and other
> > machine-specific code?
>
> In fifteen years a lot has changed in GCC, but a (perhaps) surprising
> amount has stayed the same as well.  Most earlier optimisations are done
> on the Gimple representation now, since such a higher-level
> representation is better suited for higher-level transformations; but
> most of the lower-level optimisation is still done in RTL, a
> representation that is much better suited for lower level things.  So
> most stuff in .md files will still work as-is!
>
> There are some new target macros you should implement.  Some just for
> better results, but a few will be absolutely necessary.  There are some
> changes like constraint strings in expander definitions are frowned upon
> these days (just leave them out completely, instead of empty strings).
> And new pseudo-registers from splitters are allowed now (but this does
> not invalidate old code).
>
> My advice is to go through *all* internals documentation.  Just skim
> things you find boring or uninteresting, but hopefully you will remember
> what is there, at least!  And see what new stuff there is that you could
> take advantage of.
>
> There will be new failures in the testsuite, of course, and some of
> those will point to new features you do not implement yet.
> Unfortunately for many new features the testsuite is opt-in only, so you
> get no indication you could do better there unless you activly go
> looking there.
>
> Oh, and please change your backend to use LRA instead of just old
> reload, since we are trying to get rid of the latter.  For many targets
> this does not need more than just flipping the switch, but testing can
> reveal shortcomings in your backend, or in the generic compiler as well.
>
> Good luck, and have fun!  Maybe in a year or half year or whatever you
> can write a retrospective for us, what things were surprising, what we
> did well and what not, etc.?
>
>
> Segher
>




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux