SW006015 Microchip Technology, SW006015 Datasheet - Page 34

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
DS51686A-page 30
®
TABLE 1-9:
-fstrict-aliasing
-fthread-jumps
-funroll-loops
-funroll-all-loops
Option
SPECIFIC OPTIMIZATION OPTIONS (CONTINUED)
Allows the compiler to assume the strictest aliasing rules
applicable to the language being compiled. For C, this
activates optimizations based on the type of expressions. In
particular, an object of one type is assumed never to reside at
the same address as an object of a different type, unless the
types are almost the same. For example, an unsigned int
can alias an int, but not a void* or a double. A character
type may alias any other type.
Pay special attention to code like this:
union a_union {
};
int f() {
}
The practice of reading from a different union member than
the one most recently written to (called “type-punning”) is
common. Even with -fstrict-aliasing, type-punning is
allowed, provided the memory is accessed through the union
type. So, the code above works as expected. However, this
code might not:
int f() {
}
Perform optimizations where a check is made to see if a jump
branches to a location where another comparison subsumed
by the first is found. If so, the first branch is redirected to either
the destination of the second branch or a point immediately
following it, depending on whether the condition is known to
be true or false.
Perform the optimization of loop unrolling. This is only done
for loops whose number of iterations can be determined at
compile time or runtime. -funroll-loops implies both
-fstrength-reduce and -frerun-cse-after-loop.
Perform the optimization of loop unrolling. This is done for all
loops and usually makes programs run more slowly.
-funroll-all-loops implies -fstrength-reduce, as
well as -frerun-cse-after-loop.
int i;
double d;
union a_union t;
t.d = 3.0;
return t.i;
a_union t;
int* ip;
t.d = 3.0;
ip = &t.i;
return *ip;
Definition
© 2007 Microchip Technology Inc.

Related parts for SW006015