5.8.3.3 XC-DSC C Compiler - Optimization

Notes:
  • N/A means MPLAB X IDE option not available in VS Code.
  • VSC means VS Code option is not available in MPLAB X IDE.
Table 5-22. Optimization Options - C
OptionDescriptionCommand Line
Optimization LevelSelect an optimization level. Equivalent to -On option, where n is an option. See 6.7.6 Options for Controlling Optimization.-On
Do not override 'inline'VSC: Set compiler's override of 'inline' keyword and options for -O1 and -Os; by default the compiler will not inline at these levels.
Unroll loopsCheck to perform the optimization of loop unrolling. This is only done for loops whose number of iterations can be determined at compile time or run time.

Uncheck to not unroll loops.

-funroll-loops
Omit frame pointerCheck to not keep the Frame Pointer in a register for functions that don’t need one.

Uncheck to keep the Frame Pointer.

-fomit-frame-pointer
Unlimited procedural abstractionEnable the procedure abstraction optimization. There is no limit on the nesting level.-mpa
Procedural abstraction levelEnable the procedure abstraction optimization up to level n.
  • 0 - Optimization is disabled.
  • 1 - The first level of abstraction is allowed; that is, instruction sequences in the source code may be abstracted into a subroutine.
  • 2 or greater - A second level of abstraction is allowed; that is, instructions that were put into a subroutine in the first level may be abstracted into a subroutine one level deeper. This pattern continues for larger values of n. The net effect is to limit the subroutine call nesting depth to a maximum of n.
-mpa=n
Align arraysVSC: Set the minimum alignment for array variables to be the largest power of two less than or equal to their total storage size, or the biggest alignment used on the machine, whichever is smaller.