Previous: Integrated Preprocessing, Up: Switches for gcc


3.2.18 Code Generation Control

The GCC technology provides a wide range of target dependent -m switches for controlling details of code generation with respect to different versions of architectures. This includes variations in instruction sets (e.g. different members of the power pc family), and different requirements for optimal arrangement of instructions (e.g. different members of the x86 family). The list of available -m switches may be found in the GCC documentation.

Use of these -m switches may in some cases result in improved code performance.

The GNAT technology is tested and qualified without any -m switches, so generally the most reliable approach is to avoid the use of these switches. However, we generally expect most of these switches to work successfully with GNAT, and many customers have reported successful use of these options.

Our general advice is to avoid the use of -m switches unless special needs lead to requirements in this area. In particular, there is no point in using -m switches to improve performance unless you actually see a performance improvement.