SPRUIV4D May 2020 – May 2024
After your application has been fully debugged and is working properly, it is time to begin the optimization process. First, you need to select appropriate compiler options. The following compiler options affect performance. See the C7000 C/C++ Compiler User’s Guide (SPRUIG8) for more details on command-line options.
Do not use the --disable_software_pipelining (-mu) option if you are concerned about performance. This option turns off software pipelining. Software pipelining is critical to achieving high performance on most loops. This option can be a debugging tool, as it makes the assembly code easier to understand.
The following options provide additional information for debugging and performance evaluation purposes:
--src_interlist (-s). This option causes the compiler to emit into the compiler-generated assembly files a copy of what the source code looks like after high-level optimization. This output is placed in the assembly files as comments among the assembly code. The comments output from the optimizer look like C code and show the high-level transformations that have been applied such as inlining, loop coalescing, and vectorization. This option can be useful in helping you understand the assembly code and some of what the compiler is doing to optimize the performance of the code. This option turns on the --keep_asm (-k) option, so the compiler-generated assembly (.asm) files will not be deleted.
--debug_software_pipeline (-mw). This option emits extra information about software-pipelined loops, including the single-scheduled iteration of the loop. This information is used in loop tuning examples presented later in this document. This option turns on the --keep_asm (-k) option, so the compiler-generated assembly (.asm) files will not be deleted.
--gen_opt_info=2 (-on2). This option creates a .nfo file with the same base name as the .obj file. This file contains summary information regarding the high-level optimizations that have been applied, as well as providing advice.