Release of the GCC 9 compiler suite

After a year of development published release of a free set of compilers GCC 9.1, the first significant release in the new GCC 9.x branch. In accordance with new scheme release numbering, version 9.0 was used during the development process, and shortly before the release of GCC 9.1, the GCC 10.0 branch had already forked, from which the next significant release of GCC 10.1 would form.

GCC 9.1 is notable for stabilizing support for the C++17 standard, continuing to implement the capabilities of the future C++20 standard (codenamed C++2a), including a front-end for the D language, partially providing support for OpenMP 5.0, almost full support for OpenACC 2.5, increasing scalability of interprocedural optimizations and optimizations at the linking stage, the expansion of diagnostic tools and the addition of new warnings, backends for OpenRISC, C-SKY V2 and AMD GCN GPU.

All changes:

  • Added support for the programming language D. The frontend with a compiler is included in the main structure of GCC GDC (Gnu D Compiler) and runtime libraries (libphobos) that allow you to use standard GCC to build programs in the D programming language. The process of enabling D language support in GCC has begun back in 2011, but dragged on due to the need to bring the code to compliance with GCC requirements and problems with the transfer of intellectual property rights to Digital Mars, which develops the programming language D;
  • Improvements have been made to the code generator. For example, different strategies for expanding Switch expressions (jump table, bit test, decision tree) are implemented depending on situations. Added the ability to transform linear functions that include a Switch expression using the "-ftree-switch-conversion" optimization (for example, a set of conditions like "case 2: how = 205; break; case 3: how = 305; break;" will be converted to "100 * how + 5";
  • Improved interprocedural optimizations. Inline deployment settings adapted to modern C++ codebases and extended with new options max-inline-insns-small, max-inline-insns-size, uninlined-function-insns, uninlined-function-time, uninlined-thunk-insns and uninlined -thunk-time. Improved accuracy and aggressiveness of the separation of "cold" and "hot" code. Improved scalability for very large translation units (for example, when applying optimization at the linking stage to large programs);
  • The optimization mechanism based on the results of code profiling (PGO - Profile-guided optimization) has been improved, which generates more optimal code based on the analysis of code execution features. Summary option "-fprofile-usenow includes "-fversion-loops-for-strides", "-floop-interchange", "-floop-unroll-and-jam", and "-ftree-loop-distribution" optimization modes. Removed the inclusion of histograms with counters in files, which allowed to reduce the size of files with profiles (histograms are now generated on the fly when performing optimizations during linking);
  • Link stage optimizations (LTO) have been extended. Type simplification has been provided before result generation, which has significantly reduced the size of LTO object files, reduced memory consumption at the linking stage, and improved parallelization of operations. The number of partitions (--param lto-partitions) has been increased from 32 to 128, which improves performance on systems with a large number of CPU threads. Added parameter to control the number of optimizer processes
    "β€”param lto-max-streaming-parallelism";

    As a result, compared to GCC 8.3, the optimizations introduced in GCC 9 allowed Reduce compilation time for Firefox 5 and LibreOffice 66 by about 6.2.3%. The size of object files has decreased by 7%. Binding time on 8-core CPU decreased by 11%. The sequential optimization step in the linking step is now 28% faster and consumes 20% less memory. The memory consumption of each handler of the LTO parallelizable stage has decreased by 30%;

  • Most of the parallel programming specification has been implemented for C, C++, and Fortran OpenACC 2.5, which defines the means for carrying out operations (offloading) on ​​the GPU and specialized processors, such as NVIDIA PTX;
  • Partial support of the standard is implemented for C and C++ Open MP 5.0 (Open Multi-Processing), which defines the API and methods of applying parallel programming methods for C, C++ and Fortran languages ​​on multi-core and hybrid (CPU+GPU/DSP) systems with shared memory and vectorization units (SIMD);
  • New warnings have been added for the C language: "-Waddress-of-packed-member" (the unaligned value of a pointer to a boxed member of a structure or union) and
    Β«-Wabsolute-valueΒ» (when referring to absolute value calculation functions, if there is a more suitable function for the specified argument, for example, instead of abs(3.14) you should use fabs(3.14)). New warnings added for C++: "-Wdeprecated-copy",
    "-Winit-list-lifetime", "-Wredundant-move", "-Wpessimizing-move", and "-Wclass-conversion". Extended many previously available warnings;

  • Added experimental support for part of the future C language standard, developed under the code name C2x. To enable C2x support, use the "-std=c2x" and "-std=gnu2x" options (to enable GNU extensions). The standard is still at an early stage of development, so only the _Static_assert expression with one argument is supported from its capabilities (_Static_assert with two arguments is standardized in C11);
  • C++17 standard support declared stable. In the frontend, the language features of C++17 are fully implemented, and in libstdc++, the library functions defined in the standard are close to full implementation;
  • Continued Realization of elements of the future C++2a standard. For example, the ability to include ranges during initialization has been added, extensions for lambda expressions have been implemented, support has been added for empty members of data structures and likely/unlikely attributes, the ability to call virtual functions in conditional expressions, etc. has been added.
    To enable C++2a support, use the "-std=c++2a" and "-std=gnu++2a" options. Added bit and version header files to libstdc++ for C++2a, std::remove_cvref, std::unwrap_reference, std::unwrap_decay_ref, std::is_nothrow_convertible and std::type_identity traits, std::midpoint, std::lerp functions , std::bind_front,
    std::visit, std::is_constant_evaluated and std::assume_aligned, added support for the char8_t type, implemented the ability to check the prefix and suffix of strings (starts_with, ends_with);

  • Added support for new ARM processors
    Cortex-A76, Cortex-A55, Cortex-A76 DynamIQ big.LITTLE and Neoverse N1. Added support for instructions introduced in Armv8.3-A for working with complex numbers, generating pseudo-random numbers (rng) and memory tagging (memtag), as well as instructions for blocking attacks related to speculative execution and the operation of the branch prediction block. For the AArch64 architecture, a protection mode against stack and heap intersections ("-fstack-clash-protection"). Added "-march=armv8.5-a" option to use Armv8.5-A architecture features

  • The package includes a backend for generating code for AMD GPUs based on the GCN microarchitecture. The implementation is still limited to the compilation of single-threaded applications (support for the removal of multi-threaded calculations via OpenMP and OpenACC will be offered later) and support for Fiji and Vega 10 GPUs;
  • Added a new backend for processors OpenRISC;
  • Added backend for processors C-SKY V2, produced by the Chinese company of the same name for various consumer devices;
  • All command line options that operate on byte values ​​support kb, KiB, MB, MiB, GB, and GiB suffixes;
  • Implemented option "-flive-patching=[inline-only-static|inline-clone]", which allows to achieve safe compilation for hot patching systems (live-patching) due to multi-level control over the use of interprocedural (IPA) optimizations;
  • Added "--completion" option to fine-tune autocompletion of options when using bash;
  • The diagnostic tools provide display of source text excerpts with the line number and visual marking of related information, such as operand types. To disable the output of line numbers and labels, the options "-fno-diagnostics-show-line-numbers" and "-fno-diagnostics-show-labels" are provided;

    Release of the GCC 9 compiler suite

  • Expanded tools for diagnosing errors in C++ code, improved readability of information about the causes of errors and highlighting problematic parameters;

    Release of the GCC 9 compiler suite

  • Added "-fdiagnostics-format=json" option to generate diagnostic output in machine-readable format (JSON);
  • Added new profiling options "-fprofile-filter-files" and "-fprofile-exclude-files" to select processed source files;
  • AddressSanitizer provides generation of more compact check code for automatic variables, which allowed to reduce the memory consumption of the checked executable file;
  • Improved output in "-fopt-infoΒ» (detail information about added optimizations). New "optimized" and "missed" prefixes have been added, in addition to the previously available "note" prefix. Added display of information about making a decision on inline-deployment and cycle vectorization;
  • Added the "-fsave-optimization-record" option, when specified, GCC saves the SRCFILE.opt-record.json.gz file with a description of decisions on the application of certain optimizations. The new option differs from the "-fopt-info" mode by including additional metadata, such as information about the profile and inline chains;
  • Added "-fipa-stack-alignment" and "-fipa-reference-addressable" options to control stack alignment and addressing modes (write only or read exactly) for static variables during interprocedural optimizations;
  • New built-in functions are introduced to control attribute binding, as well as behavior related to branch prediction and speculative instruction execution:__builtin_has_attribute","__builtin_expect_with_probability" And "__builtin_speculation_safe_value". New attribute added for functions, variables and types copy;
  • For the Fortran language, full support for asynchronous I / O is implemented;
  • Deprecated and will be removed in the next major release for Solaris 10 (*-*-solaris2.10) and Cell/BE (Cell Broadband Engine SPU) platforms. Ended support for Armv2, Armv3, Armv5 and Armv5E architectures. Support for the Intel MPX (Memory Protection Extensions) extension has been discontinued.

Source: opennet.ru

Add a comment