12.07.2015 Views

MPLAB C32 C COMPILER USER'S GUIDE

MPLAB C32 C COMPILER USER'S GUIDE

MPLAB C32 C COMPILER USER'S GUIDE

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>MPLAB</strong> ® <strong>C32</strong> C Compiler User’s GuideYou can use the following flags in the rare cases when “fine-tuning” of optimizations tobe performed is desired.TABLE 1-9: SPECIFIC OPTIMIZATION OPTIONSOptionDefinition-falign-functions-falign-functions=n-falign-labels-falign-labels=n-falign-loops-falign-loops=n-fcaller-saves-fcse-follow-jumps-fcse-skip-blocks-fexpensiveoptimizations-ffunction-sections-fdata-sections-fgcseAlign the start of functions to the next power-of-two greaterthan n, skipping up to n bytes. For instance,-falign-functions=32 aligns functions to the next32-byte boundary, but -falign-functions=24 would alignto the next 32-byte boundary only if this can be done byskipping 23 bytes or less.-fno-align-functions and -falign-functions=1 areequivalent and mean that functions are not aligned.The assembler only supports this flag when n is a power oftwo, so n is rounded up. If n is not specified, use amachine-dependent default.Align all branch targets to a power-of-two boundary, skippingup to n bytes like -falign-functions. This option caneasily make code slower, because it must insert dummyoperations for when the branch target is reached in the usualflow of the code.If -falign-loops or -falign-jumps are applicable andare greater than this value, then their values are used instead.If n is not specified, use a machine-dependent default which isvery likely to be 1, meaning no alignment.Align loops to a power-of-two boundary, skipping up to n byteslike -falign-functions. The hope is that the loop isexecuted many times, which makes up for any execution ofthe dummy operations.If n is not specified, use a machine-dependent default.Enable values to be allocated in registers that are clobberedby function calls, by emitting extra instructions to save andrestore the registers around such calls. Such allocation isdone only when it seems to result in better code than wouldotherwise be produced.In common subexpression elimination, scan through jumpinstructions when the target of the jump is not reached by anyother path. For example, when CSE encounters an ifstatement with an else clause, CSE follows the jump whenthe condition tested is false.This is similar to -fcse-follow-jumps, but causes CSE tofollow jumps which conditionally skip over blocks. When CSEencounters a simple if statement with no else clause,-fcse-skip-blocks causes CSE to follow the jump aroundthe body of the if.Perform a number of minor optimizations that are relativelyexpensive.Place each function or data item into its own section in theoutput file. The name of the function or the name of the dataitem determines the section's name in the output file.Only use these options when there are significant benefits fordoing so. When you specify these options, the assembler andlinker may create larger object and executable files and is alsoslower.Perform a global common subexpression elimination pass.This pass also performs global constant and copypropagation.DS51686A-page 28© 2007 Microchip Technology Inc.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!