07.04.2013 Views

MPLAB C Compiler for PIC24 MCUs and dsPIC DSCs ... - Microchip

MPLAB C Compiler for PIC24 MCUs and dsPIC DSCs ... - Microchip

MPLAB C Compiler for PIC24 MCUs and dsPIC DSCs ... - Microchip

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.

16-Bit C <strong>Compiler</strong> User’s Guide<br />

TABLE 3-9: SPECIFIC OPTIMIZATION OPTIONS (CONTINUED)<br />

Option Definition<br />

-fcse-follow-jumps In common subexpression elimination, scan through jump<br />

instructions when the target of the jump is not reached by any<br />

other path. For example, when CSE encounters an if<br />

statement with an else clause, CSE will follow the jump when<br />

the condition tested is false.<br />

-fcse-skip-blocks This is similar to -fcse-follow-jumps, but causes CSE to<br />

follow jumps which conditionally skip over blocks. When CSE<br />

encounters a simple if statement with no else clause,<br />

-fcse-skip-blocks causes CSE to follow the jump around<br />

the body of the if.<br />

-fexpensiveoptimizations<br />

-ffunction-sections<br />

-fdata-sections<br />

Per<strong>for</strong>m a number of minor optimizations that are relatively<br />

expensive.<br />

Place each function or data item into its own section in the<br />

output file. The name of the function or the name of the data<br />

item determines the section’s name in the output file.<br />

Only use these options when there are significant benefits <strong>for</strong><br />

doing so. When you specify these options, the assembler <strong>and</strong><br />

linker may create larger object <strong>and</strong> executable files <strong>and</strong> will<br />

also be slower.<br />

-fgcse Per<strong>for</strong>m a global common subexpression elimination pass.<br />

This pass also per<strong>for</strong>ms global constant <strong>and</strong> copy<br />

propagation.<br />

-fgcse-lm When -fgcse-lm is enabled, global common subexpression<br />

elimination will attempt to move loads which are only killed by<br />

stores into themselves. This allows a loop containing a<br />

load/store sequence to be changed to a load outside the loop,<br />

<strong>and</strong> a copy/store within the loop.<br />

-fgcse-sm When -fgcse-sm is enabled, a store motion pass is run after<br />

global common subexpression elimination. This pass will<br />

attempt to move stores out of loops. When used in conjunction<br />

with -fgcse-lm, loops containing a load/store sequence can<br />

be changed to a load be<strong>for</strong>e the loop <strong>and</strong> a store after the<br />

loop.<br />

-fmove-all-movables Forces all invariant computations in loops to be moved outside<br />

the loop.<br />

-fno-defer-pop Always pop the arguments to each function call as soon as<br />

that function returns. The compiler normally lets arguments<br />

accumulate on the stack <strong>for</strong> several function calls <strong>and</strong> pops<br />

them all at once.<br />

-fno-peephole<br />

-fno-peephole2<br />

-foptimizeregister-move<br />

-fregmove<br />

Disable machine specific peephole optimizations. Peephole<br />

optimizations occur at various points during the compilation.<br />

-fno-peephole disables peephole optimization on machine<br />

instructions, while -fno-peephole2 disables high level<br />

peephole optimizations. To disable peephole entirely, use both<br />

options.<br />

Attempt to reassign register numbers in move instructions <strong>and</strong><br />

as oper<strong>and</strong>s of other simple instructions in order to maximize<br />

the amount of register tying.<br />

-fregmove <strong>and</strong> -foptimize-register-moves are the<br />

same optimization.<br />

DS51284H-page 48 © 2008 <strong>Microchip</strong> Technology Inc.

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

Saved successfully!

Ooh no, something went wrong!