Some pointer to understanding GCC source code

I am working on optimizing GCC for multi-core processors. I tried to go through the source code, it is hard to go with it, since I need to add the code to the end. Can anyone suggest a good resource that explains code flow through different phases. Also suggest some development environments for debugging GCC, primarily for navigating through code. Is it possible on the windows?

+6
compiler-optimization multicore gcc4
source share
2 answers

For a starting point, see Links and Selected Readings on the GCC website. I am particularly interested, I think that:

If you want to develop Windows, you probably need to start with MinGW (Minimalist GNU for Windows) Sources for the Compiler Suite (it includes the GNU GDB debugger), which is the GCC port for Windows.

For a convenient development environment, I can not help much, because it does not develop in C ++. But I suggest that you need a good IDE for C / C ++: look at this comparison , there are many free open source IDEs for Windows.

Update: I think ICI might also be of interest to you:

The interactive compilation interface (or “ICI” for short) is a plug-in system with a high level independent of the compiler and a low-level compiler-specific API for converting modern compilers into shared open-source modular interactive tools. The ICI structure acts as a "middleware", an interface between the compiler and user-defined plugins. It opens and reuses the production-quality compiler infrastructure to include software analysis and tools, optimizing a fine-grained program, simply prototyping new designs and research ideas, avoiding creating new compilation tools from scratch. For example, it is used in MILEPOST GCC to automate the compiler and design and develop architecture optimization based on statistical analysis and machine learning. This should provide universal self-tuning compilers that are adaptable to heterogeneous, reconfigurable, multi-core architectures from supercomputers to embedded systems.

.. like other projects under the collective Tuning umbrella.

Note: Writing “compilers is one of the most complicated programs”, as BlueRaja writes in the comments, is an exaggeration: there are very simple compilers and very complex compilers. But in the theory of compilers (as soon as you study it) there is nothing esoteric. GCC is a complicated program to understand how a BIG , poorly documented program is there 1 . Therefore rizwanhudda is not discouraged: start looking at the available documentation, and then ask the GCC developers (on the GCC irc channel offered by nvl or the GCC developers mailing list ) to explain what is bad (or not confirmed at all).

+7
source share

I suggest you use the GCC irc channel , it is intended to discuss the development of GCC.

+1
source share

All Articles