SW006012 Microchip Technology, SW006012 Datasheet - Page 55

C COMPILER FOR DSPIC30F FAMILY

SW006012

Manufacturer Part Number
SW006012
Description
C COMPILER FOR DSPIC30F FAMILY
Manufacturer
Microchip Technology
Type
MPLAB® C30 Compilerr
Series
PIC24 & DsPICr
Datasheets

Specifications of SW006012

Supported Families
PIC24, DsPIC30F And DsPIC33F
Core Architecture
PIC, DsPIC
Kit Contents
Software And Docs
Mcu Supported Families
PIC24 MCUs And DsPIC DSCs
Tool Type
Compiler
Processor Series
PIC24, dsPIC
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
dsPIC30F
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
© 2007 Microchip Technology Inc.
TABLE 3-9:
-freduce-all-givs
-frename-registers
-frerun-cse-after-
-frerun-loop-opt
-fschedule-insns
-fschedule-insns2
-fstrength-reduce
-fstrict-aliasing
loop
Option
SPECIFIC OPTIMIZATION OPTIONS (CONTINUED)
Using MPLAB C30 C Compiler
Forces all general-induction variables in loops to be
strength-reduced.
These options may generate better or worse code; results are
highly dependent on the structure of loops within the source
code.
Attempt to avoid false dependencies in scheduled code by
making use of registers left over after register allocation. This
optimization will most benefit processors with lots of registers.
It can, however, make debugging impossible, since variables
will no longer stay in a “home register”.
Rerun common subexpression elimination after loop
optimizations has been performed.
Run the loop optimizer twice.
Attempt to reorder instructions to eliminate dsPIC® DSC
Read-After-Write stalls (see the “dsPIC30F Family Reference
Manual” (DS70046) for more details). Typically improves
performance with no impact on code size.
Similar to -fschedule-insns, but requests an additional
pass of instruction scheduling after register allocation has
been done.
Perform the optimizations of loop strength reduction and
elimination of iteration variables.
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 will work as expected. However, this
code might not:
int f() {
}
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
DS51284F-page 49

Related parts for SW006012