Tag / GCC

  • October 13, 2015 - Daniel Kolesa

    Some Final Thoughts on C++11

    This article is part 4 of a 4 part series on the benefits of the C++11 revision of the C++ programming language. The previous three articles in this series introduced readers to C++11 toolchains and some of the biggest features this revision of C++ provides. This article covers a handful of minor features that are still quite valuable for anyone writing software in C++11 including range-based for loops, initializer lists, null pointer constants, strongly typed enumerations, static asserts, user defined literals and more. Finally, this article closes with an introduction to a personal project of mine that makes a handful of things in C++11 easier. Other improvements There are quite a few features of C++11 that are worth mentioning, even if they don’t warrant as detailed an entry as the last two articles in this series. Range-based for Loop There is now a new for loop syntax for iterating over […]

    Read More
  • August 18, 2015 - Daniel Kolesa

    Introduction to C++11 Toolchains

    This article is part 1 of a 4 part series on the benefits of the C++11 revision of the C++ programming language The C++11 standard has been with us for quite a while, but it hasn’t yet gained traction as significantly as one might expect. It’s a shame as there are many reasons to utilize C++11 features, and the toolchain support is pretty good, especially on Unix-like systems with Windows finally catching up. I decided to write a series of articles to advertise the benefits of C++11 and provide an explanation of some of the new features. I found various resources on the web that are quite misleading, so I feel it is important to clarify some things. This article will focus on three of the popular toolchains used for compiling C++ programs. Toolchain Coverage C++11 toolchain support seems to be pretty good. These are the main three compilers most […]

    Read More
  • June 17, 2015 - Tilmann Scheller

    A Conclusion to Accelerating Your Build with Clang

    This is the second part of a series that explores improving the build process using Clang. This post will take a look at the remaining methods for speeding up the build and will conclude with an overall summary of the improved speeds. To read an introduction to this experiment as well as the build system we are using, take a look at part one of this series. Here is our list of ideas again: Generic: Build with Clang rather than GCC Use a faster linker, such as GNU gold Optimize our host compiler binary aggressively (LTO, PGO, LTO+PGO) Move parts of the debug info into separate files: split DWARF Use Ninja rather than GNU make in CMake-based projects Cache object files with ccache Use a shared library build instead of a static build for incremental debug builds Clang/LLVM-specific: Optimize TableGen for debug builds Build less: e.g. build only the backends we […]

    Read More
  • Building software is a time-consuming task, especially if you are working on large codebases such as Clang and LLVM (2.5M C++ lines combined). As an LLVM developer, a significant portion of my time is spent building the software because a clean build take several minutes to complete. The work outlined in this series started out as an experiment to see by how much we could speed up the build process by using different tools or build settings rather than simply upgrading our hardware, and the goal is to squeeze as much performance out of the toolchain as possible. The focus is on building Clang/LLVM, however most of the results and corresponding suggestions will apply to other large C++ projects as well, and this post expands on a lightning talk I recently gave at the EuroLLVM 2015 conference. Taking a Look at the Options So what can we actually do to speed up […]

    Read More