Code Development Flow To Increase Performance
1-6
Table 1–1,
Code Development Steps, describes the recommended code de-
velopment flow for developing code which achieves the highest performance
on loops.
Table 1–1. Code Development Steps
Step
Description
Phase
1
1
Compile and profile native C/C++ code
-
Validates original C/C++ code
-
Determines which loops are most important in terms of MIPS require-
ments.
Phase
2
Add restrict qualifier, loop iteration count, memory bank, and data alignment
information.
-
Reduces potential pointer aliasing problems
-
Allows loops with indeterminate iteration counts to execute epilogs
-
Uses pragmas to pass count information to the compiler
-
Uses memory bank pragmas and _nassert intrinsic to pass memory
bank and alignment information to the compiler.
Phase
2
3
Optimize C code using other ’C6000 intrinsics and other methods
-
Facilitates use of certain ’C6000 instructions not easily represented in
C.
-
Optimizes data flow bandwidth (uses word access for short (’C62x,
’C64x, and ’C67x) data, and double word access for word (’C64x, and
’C67x) data).
Phase
3
4a
Write linear assembly
-
Allows control in determining exact ’C6000 instructions to be used
-
Provides flexibility of hand-coded assembly without worry of pipelining,
parallelism, or register allocation.
-
Can pass memory bank information to the tools
-
Uses .trip directive to convey loop count information
4b
Add partitioning information to the linear assembly
-
Can improve partitioning of loops when necessary
-
Can avoid bottlenecks of certain hardware resources