Optimization Levels
Optimization Levels
Optimization Scope
Optimization Scope
FILE1.C
FILE1.C
{
{
{
{
SESE
SESE
}
}
{
{
. . .
. . .
}
}
}
}
{
{
. . .
. . .
}
}
FILE2.C
FILE2.C
-
-
o0,
o0,
-
-
o1
o1
-
-
o2
o2
-
-
o3
o3
-
-
pm
pm
-
-
o3
o3
SESE: Single Entry, Single Exit
SESE: Single Entry, Single Exit
LOCAL
LOCAL
single block
single block
FUNCTION
FUNCTION
across
across
blocks
blocks
FILE
FILE
across
across
functions
functions
PROGRAM
PROGRAM
across files
across files
{
{
. . .
. . .
}
}
Optimizations fall into 4 categories. This is also a methodology that should be used to invoke the
optimizations. It is recommended that optimization be invoked in steps, and that code be verified
before advancing to the next step. Intermediate steps offer the gradual transition from fully sym-
bolic to fully optimized compilation. Compiler switched may be invoked in a variety of ways.
Here are 4 steps that could be considered:
1
st
: use –g
By starting out with –g, you do no optimization at all and keep symbols for debug.
2
nd
: use –g –o3
The option –o3 might be too big a jump, but it adds the optimizer and keeps symbols.
3
rd
: use –g –o3 –mn
This is a full optimization, but keeps some symbols
4
th
: use –o3
Full optimization, symbols are not kept.
C28x – C Programming
D - 9
Summary of Contents for C28 Series
Page 64: ...Summary 3 16 C28x Peripheral Registers Header Files ...
Page 78: ...Interrupt Sources 4 14 C28x Reset and Interrupts ...
Page 218: ...Lab 9 DSP BIOS 9 22 C28x Using DSP BIOS ...
Page 244: ...Lab 10 Programming the Flash 10 26 C28x System Design ...
Page 273: ...Appendix A eZdsp F2812 C28x Appendix A eZdsp F2812 A 1 ...
Page 276: ...Appendix P2 Expansion Interface A 4 C28x Appendix A eZdsp F2812 ...
Page 277: ...Appendix P4 P8 P7 I O Interface C28x Appendix A eZdsp F2812 A 5 ...
Page 278: ...Appendix A 6 C28x Appendix A eZdsp F2812 ...
Page 279: ...Appendix P5 P9 Analog Interface C28x Appendix A eZdsp F2812 A 7 ...
Page 282: ...Appendix A 10 C28x Appendix A eZdsp F2812 TP1 TP2 Test Points ...