Announcement

Collapse
No announcement yet.

GCC 4.5 Steps Closer To Release

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • phoronix
    started a topic GCC 4.5 Steps Closer To Release

    GCC 4.5 Steps Closer To Release

    Phoronix: GCC 4.5 Steps Closer To Release

    Novell's Richard Guenther has issued a GCC 4.5 status report this morning as yesterday this next major version of the GNU Compiler Collection had left "Stage 3" and is now entering a period in which only regression fixes and documentation work will take place.The first GCC 4.5 release candidate will be made once there are no longer any P1 regressions remaining. As of this morning, of the P1 regressions there were 26, 93 regressions of P2 priority, and then just four P3 regressions...

    http://www.phoronix.com/vr.php?view=Nzc2MQ

  • Basile Starynkevitch
    replied
    What's new: LTO & plugins!

    Originally posted by Raine View Post
    What's is comming new to 4.5 release?
    In addition of Link Time Optimization, there is also another new important feature of GCC 4.5: plugins.

    GCC plugins enable extra functionality inside the compiler, such as
    • library specific optimizations
    • library (or application) specific diagnostics
    • everything but the kitchen sink you want to enable inside GCC


    A simple example of library (or application) specific optimization is the transformation of fprintf(stdout, ...) to printf(...). This is better done inside the compiler (in particular, to take into account inlining, etc..).

    A simple example of library specific diagnostics could be to issue a warning when a user C function calls malloc but does not check that the result returned by malloc is not null (it could be null when the memory is full).

    Plugins are usually coded in C (they are required to have a GPL compatible licence), and depends upon the exact version of the compiler (so a plugin coded for GCC 4.5.0 probably won't run on GCC 4.5.1 or GCC 4.6.0). You should expect to learn & understand a bit of GCC internals before coding GCC plugins.

    There is even a plugin, called MELT, which provides you with a higher-level language (with Lispy syntax) to code more quickly your GCC plugins.


    One could hope that several plugins will appear after GCC 4.5. It is hoped that major huge free software (e.g. KDE or GNOME graphical environments, Linux kernel, etc..) wil eventually develop their own GCC plugins to help compile them better (e.g. to validate some coding styles rules, etc...).

    Disclaimer: I am the author of MELT, and I am a big enthusiast of the GCC plugin idea. But some important GCC hackers still believe that plugins are not really important.


    --
    Basile Starynkevitch - http://starynkevitch.net/Basile

    Leave a comment:


  • curaga
    replied
    Thanks. Makes sense.

    Leave a comment:


  • XorEaxEax
    replied
    Originally posted by curaga View Post
    Can you explain the difference between "-combine -fwhole-program *.c" and this new -flto? From your explanation it sounds similar.
    As I understand it -flto is basically an improved version of '--combine' and that '--combine' will be deprecated.

    Leave a comment:


  • curaga
    replied
    Can you explain the difference between "-combine -fwhole-program *.c" and this new -flto? From your explanation it sounds similar.

    Leave a comment:


  • Apopas
    replied
    Originally posted by XorEaxEax View Post
    Faster executable, and yes it's also likely that the executable will end up being smaller with link time optimization. Also you should combine '-flto' with '-fwhole-program' for the best results (enables more aggressive interprocedural optimizations)
    I'll keep it in mind when I install gcc-4.5 in my Gentoo. Thanks a lot XorEaxEax

    Leave a comment:


  • XorEaxEax
    replied
    Originally posted by Apopas View Post
    But that means faster executable or just faster compilation?
    Also if the first case is the real one, the dead code elimination means smaller executables and thus faster startup and lower memory usage, right?
    Faster executable, and yes it's also likely that the executable will end up being smaller with link time optimization. Also you should combine '-flto' with '-fwhole-program' for the best results (enables more aggressive interprocedural optimizations)

    Leave a comment:


  • Apopas
    replied
    Originally posted by XorEaxEax View Post
    Don't know if there's simple words for it. But basically it means that instead of the compiler looking at all the object files as single entities, it allows the compiler to look at all the object files that make up a project as one big program which can help alot when the compiler needs to determine when to inline, reduce duplicate funcionality, eliminate dead code etc...
    But that means faster executable or just faster compilation?
    Also if the first case is the real one, the dead code elimination means smaller executables and thus faster startup and lower memory usage, right?

    Leave a comment:


  • XorEaxEax
    replied
    Originally posted by Apopas View Post
    Could someone explain in simple words if this -flto thing is goig to offer better performance to applications?
    Don't know if there's simple words for it. But basically it means that instead of the compiler looking at all the object files as single entities, it allows the compiler to look at all the object files that make up a project as one big program which can help alot when the compiler needs to determine when to inline, reduce duplicate funcionality, eliminate dead code etc. The speed improvements can be very good (of course depending on program), an example of this would be sqlite with their amalgamation approach where all code files are merged into a single one and then compiled giving 5-10% improvement.

    And yes really looking forward to the new graphite implementation, the previous one in 4.4 was missing alot (as seen here http://gcc.gnu.org/wiki/Graphite/4.5) and I believe it has alot of potential.

    Apart from that I've noticed that PGO (profile guided optimization) is slightly improved aswell when I've tried the weekly snapshots. All in all GCC 4.5 is shaping up to be a great release.

    Leave a comment:


  • Apopas
    replied
    Could someone explain in simple words if this -flto thing is goig to offer better performance to applications?

    Leave a comment:

Working...
X