Home

Code Generation

The code generation panel allows control over optimization and debugging settings.

Optimization Level

This dropdown provides four different optimization options. The available modes are:

  • None – No optimizations will be performed
  • Size – Generates the smallest possible target
  • Common – Allows for a number of common optimizations, equivalent to GNU Fortran’s “-02”
  • Extreme – Allows for additional optimization, equivalent to GNU Fortran’s “-03”

Aggressive Loop Optimizations

Enabling the option allows the compiler to perform a number of optimizations related to loops, including reordering nested loops and attempting to parallelize loops where possible.

Link Time Optimization

When this option is enabled, individual object files are compiled with additional information to enable the linker to perform additional optimizations. The linker can then perform additional cross-unit optimizations that may lead to performance improvements. This feature is generally not compatible with enabling debugging.

Enable Debugging

When enabled, debugging information is generated during compilation, allowing the program to be debugged when requested.

Enable Profiling

A target compiled with profiling enabled will generate data concerning the frequency and duration of function calls within the compiled target when the target is launched. This data can then be used to generate a profile analysis.

Target CPU

The dropdown offers a list of central processing units for which the compiled code can be tuned. If the resultant target is going to be distributed to others on different machines, generic is suggested as the best option. If the target will solely be used on the user’s machine, the native option will tune the target to make use of any features available on the user’s machine. Alternatively, a model may be selected from the dropdown.

When the Compile Strictly for Selection option is enabled, the resultant target will not run on CPUs that do not possess the features specified in the Target CPU’s dropdown box. Enabling this option can provide speed benefits at the cost of compatibility.

Memory Model

On Intel x86 and AMD64 platforms, the memory model of the resultant code can be specified. The model allows some flexibility with respect to how much memory a program may access statically. Notably, switching to a medium memory model allows static array allocations up to 2GB on 64-bit operating systems. The large memory model allows static allocations to exceed 4GB, but is unavailable on the Windows platform. For most cases and for software making heavy use of dynamically allocated arrays, the small memory model is sufficient.

This option is not applicable on CPUs that are not part of the x86/AMD64 family.

Please note that the above memory limitations may be futher constrained by the underlying operating system. For example, 32-bit Windows will not allow an executable, in general, to exceed 1.5GB of memory allocation total regardless of the theoretical limits of a 32-bit operating system and platform.