SW006015 Microchip Technology, SW006015 Datasheet - Page 31

C COMPILER MPLAB C32

SW006015

Manufacturer Part Number
SW006015
Description
C COMPILER MPLAB C32
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC32r
Datasheets

Specifications of SW006015

Supported Families
PIC32MX5, MX6, And MX7
Core Architecture
PIC
Kit Contents
Software And Docs
Mcu Supported Families
PIC32 MCUs
Tool Function
Compiler
Supported Devices
PIC32 MCUs
Tool Type
Compiler
Processor Series
PIC32
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
PIC32
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
© 2007 Microchip Technology Inc.
1.8.6
The following options control compiler optimizations.
TABLE 1-8:
The following options control specific optimizations. The -O2 option turns on all of
these optimizations except -funroll-loops, -funroll-all-loops and
-fstrict-aliasing.
-O0
-O
-O1
-O2
-O3
-Os
Options for Controlling Optimization
Option
GENERAL OPTIMIZATION OPTIONS
Do not optimize. (This is the default.)
Without -O, the compiler’s goal is to reduce the cost of
compilation and to make debugging produce the expected
results. Statements are independent: if you stop the program
with a breakpoint between statements, you can then assign a
new value to any variable or change the program counter to
any other statement in the function and get exactly the results
you would expect from the source code.
The compiler only allocates variables declared register in
registers.
Optimization level 1. Optimizing compilation takes somewhat
longer, and a lot more host memory for a large function.
With -O, the compiler tries to reduce code size and execution
time.
When -O is specified, the compiler turns on
-fthread-jumps and
-fomit-frame-pointer.
Optimization level 2. MPLAB C32 C compiler performs nearly
all supported optimizations that do not involve a space-speed
trade-off. -O2 turns on all optional optimizations except for
loop unrolling (-funroll-loops), function inlining
(-finline-functions), and strict aliasing optimizations
(-fstrict-aliasing). It also turns on force copy of
memory operands (-fforce-mem) and Frame Pointer
elimination (-fomit-frame-pointer). As compared to -O,
this option increases both compilation time and the
performance of the generated code.
Optimization level 3. -O3 turns on all optimizations specified
by -O2 and also turns on the inline-functions option.
Optimize for size. -Os enables all -O2 optimizations that do
not typically increase code size. It also performs further
optimizations designed to reduce code size.
-fdefer-pop. The compiler turns on
Definition
DS51686A-page 27

Related parts for SW006015