Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
Compiler Command-Line Driver
2012-2013 Microchip Technology Inc. DS50002071C-page 95
You can use the following flags in the rare cases when fine-tuning of optimizations to
be performed is desired.
TABLE 5-12: SPECIFIC OPTIMIZATION OPTIONS
Option Definition
-falign-functions
-falign-functions=n
Align the start of functions to the next power-of-two greater than
n, skipping up to n bytes. For instance,
-falign-functions=32 aligns functions to the next 32-byte
boundary, but -falign-functions=24 would align to the next
32-byte boundary only if this can be done by skipping 23 bytes or
less.
-fno-align-functions and -falign-functions=1 are
equivalent and mean that functions will not be aligned.
The assembler only supports this flag when n is a power of two;
so n is rounded up. If n is not specified, use a machine-dependent
default.
-falign-labels
-falign-labels=n
Align all branch targets to a power-of-two boundary, skipping up
to n bytes like -falign-functions. This option can easily
make code slower, because it must insert dummy operations for
when the branch target is reached in the usual flow of the code.
If -falign-loops or -falign-jumps are applicable and are
greater than this value, then their values are used instead.
If n is not specified, use a machine-dependent default which is
very likely to be 1, meaning no alignment.
-falign-loops
-falign-loops=n
Align loops to a power-of-two boundary, skipping up to n bytes
like -falign-functions. The hope is that the loop will be exe-
cuted many times, which will make up for any execution of the
dummy operations.
If n is not specified, use a machine-dependent default.
-fcaller-saves Enable values to be allocated in registers that will be clobbered by
function calls, by emitting extra instructions to save and restore
the registers around such calls. Such allocation is done only when
it seems to result in better code than would otherwise be pro-
duced.
-fcse-follow-jumps In common subexpression elimination, scan through jump instruc-
tions when the target of the jump is not reached by any other
path. For example, when CSE encounters an if statement with
an else clause, CSE will follow the jump when the condition
tested is false.
-fcse-skip-blocks This is similar to -fcse-follow-jumps, but causes CSE to fol-
low jumps which conditionally skip over blocks. When CSE
encounters a simple if statement with no else clause,
-fcse-skip-blocks causes CSE to follow the jump around the
body of the if.
-fexpensive-
optimizations
Perform a number of minor optimizations that are relatively
expensive.
-ffunction-sections
-fdata-sections
Place each function or data item into its own section in the output
file. The name of the function or the name of the data item deter-
mines the sections name in the output file.
Only use these options when there are significant benefits for
doing so. When you specify these options, the assembler and
linker may create larger object and executable files and will also
be slower.
-fgcse Perform a global common subexpression elimination pass. This
pass also performs global constant and copy propagation.
Protego_Release_01_05-Related-OEM-Documentation-MPLAB-XC16-C-Compiler.pdf