Sign in to follow this  
Followers 0

GCC 4.8 Released

7 posts in this topic

Posted

GCC 4.8 Release Series

Changes, New Features, and Fixes

Caveats

GCC now uses C++ as its implementation language. This means that to build GCC from sources, you will need a C++ compiler that understands C++ 2003. For more details on the rationale and specific changes, please refer to the C++ conversion page.

To enable the Graphite framework for loop optimizations you now need CLooG version 0.18.0 and ISL version 0.11.1. Both can be obtained from the GCC infrastructure directory. The installation manual contains more information about requirements to build GCC.

GCC now uses a more aggressive analysis to derive an upper bound for the number of iterations of loops using constraints imposed by language standards. This may cause non-conforming programs to no longer work as expected, such as SPEC CPU 2006 464.h264ref and 416.gamess. A new option, -fno-aggressive-loop-optimizations, was added to disable this aggressive analysis. In some loops that have known constant number of iterations, but undefined behavior is known to occur in the loop before reaching or during the last iteration, GCC will warn about the undefined behavior in the loop instead of deriving lower upper bound of the number of iterations for the loop. The warning can be disabled with -Wno-aggressive-loop-optimizations.

On ARM, a bug has been fixed in GCC's implementation of the AAPCS rules for the layout of vectors that could lead to wrong code being generated. Vectors larger than 8 bytes in size are now by default aligned to an 8-byte boundary. This is an ABI change: code that makes explicit use of vector types may be incompatible with binary objects built with older versions of GCC. Auto-vectorized code is not affected by this change.

On AVR, support has been removed for the command-line option -mshort-calls deprecated in GCC 4.7.

On AVR, the configure option --with-avrlibc supported since GCC 4.7.2 is turned on per default for all non-RTEMS configurations. This option arranges for a better integration of AVR Libc with avr-gcc. For technical details, see PR54461. To turn off the option in non-RTEMS configurations, use --with-avrlibc=no. If the compiler is configured for RTEMS, the option is always turned off.

More information on porting to GCC 4.8 from previous versions of GCC can be found in the porting guide for this release.

General Optimizer Improvements (and Changes)

  • DWARF4 is now the default when generating DWARF debug information. When -g is used on a platform that uses DWARF debugging information, GCC will now default to -gdwarf-4 -fno-debug-types-section.
    GDB 7.5, Valgrind 3.8.0 and elfutils 0.154 debug information consumers support DWARF4 by default. Before GCC 4.8 the default version used was DWARF2. To make GCC 4.8 generate an older DWARF version use -g together with -gdwarf-2 or -gdwarf-3. The default for Darwin and VxWorks is still -gdwarf-2 -gstrict-dwarf.
  • A new general optimization level, -Og, has been introduced. It addresses the need for fast compilation and a superior debugging experience while providing a reasonable level of runtime performance. Overall experience for development should be better than the default optimization level -O0.
  • A new option -ftree-partial-pre was added to control the partial redundancy elimination (PRE) optimization. This option is enabled by default at the -O3 optimization level, and it makes PRE more aggressive.
  • The option -fconserve-space has been removed; it was no longer useful on most targets since GCC supports putting variables into BSS without making them common.
  • The struct reorg and matrix reorg optimizations (command-line options -fipa-struct-reorg and -fipa-matrix-reorg) have been removed. They did not always work correctly, nor did they work with link-time optimization (LTO), hence were only applicable to programs consisting of a single translation unit.
  • Several scalability bottle-necks have been removed from GCC's optimization passes. Compilation of extremely large functions, e.g. due to the use of the flatten attribute in the "Eigen" C++ linear algebra templates library, is significantly faster than previous releases of GCC.
  • Link-time optimization (LTO) improvements:
    • LTO partitioning has been rewritten for better reliability and maintanibility. Several important bugs leading to link failures have been fixed.
    • Interprocedural optimization improvements:

      • A new symbol table has been implemented. It builds on existing callgraph and varpool modules and provide a new API. Unusual symbol visibilities and aliases are handled more consistently leading to, for example, more aggressive unreachable code removal with LTO.
      • The inline heuristic can now bypass limits on the size of of inlined functions when the inlining is particularly profitable. This happens, for example, when loop bounds or array strides get propagated.
      • Values passed through aggregates (either by value or reference) are now propagated at the inter-procedural level leading to better inlining decisions (for example in the case of Fortran array descriptors) and devirtualization.

      [*]AddressSanitizer , a fast memory error detector, has been added and can be enabled via -fsanitize=address. Memory access instructions will be instrumented to detect heap-, stack-, and global-buffer overflow as well as use-after-free bugs. To get nicer stacktraces, use -fno-omit-frame-pointer. The AddressSanitizer is available on IA-32/x86-64/x32/PowerPC/PowerPC64 GNU/Linux and on x86-64 Darwin.

      [*]ThreadSanitizer has been added and can be enabled via -fsanitize=thread. Instructions will be instrumented to detect data races. The ThreadSanitizer is available on x86-64 GNU/Linux.

      New Languages and Language specific improvements

      C family

      [*]Each diagnostic emitted now includes the original source line and a caret '^' indicating the column. The option -fno-diagnostics-show-caret suppresses this information.

      [*]The option -ftrack-macro-expansion=2 is now enabled by default. This allows the compiler to display the macro expansion stack in diagnostics. Combined with the caret information, an example diagnostic showing these two features is:

      t.c:1:94: error: invalid operands to binary < (have

Share this post


Link to post
Share on other sites

Posted

Holy Novel Batman!

You really should just post an excerpt of the article and then source link to the rest of it. :)

Regards

Share this post


Link to post
Share on other sites

Posted

A new general optimization level, -Og, has been introduced. It addresses the need for fast compilation and a superior debugging experience while providing a reasonable level of runtime performance. Overall experience for development should be better than the default optimization level -O0.
One of my (numerous) pet peeves with C++ is how terrible and unrepresentative of final performance debug builds are, this brings me some hope.

Use of hardware RNG instruction for random_device on new x86 processors (requires the assembler to support the instruction.)
I suppose this refers to the Ivy Bridge RdRand?

You really should just post an excerpt of the article and then source link to the rest of it. :)

I just read all of it... :shiftyninja:

Share this post


Link to post
Share on other sites

Posted

One of my (numerous) pet peeves with C++ is how terrible and unrepresentative of final performance debug builds are, this brings me some hope.

Try a fully optimized release build (e.g. with Intels compiler)! After that you'll never again have problems with optimized debug builds... :)

Share this post


Link to post
Share on other sites

Posted

I just read all of it... :shiftyninja:

Respect Moderator Decisions! :angry:

Just kidding :p

Share this post


Link to post
Share on other sites

Posted

A lot of effort put into formatting that post. Thanks for that!

Looking forward to the TDM release for 4.8.0. Looks like a solid release :)

Share this post


Link to post
Share on other sites

Posted

A lot of effort put into formatting that post. Thanks for that!
I didn't format it. Straight copy-pasta.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.