Assembly Optimizer Options And Directives - Texas Instruments TMS320C6000 Programmer's Manual

Hide thumbs Also See for TMS320C6000:
Table of Contents

Advertisement

Assembly Optimizer Options and Directives

6.2 Assembly Optimizer Options and Directives
6.2.1
The –o n Option
6.2.2
The –mt Option and the .no_mdep Directive
Example 6–1. Linear Assembly Block Copy
loop:
ldw *reg1++, reg2
add reg2, reg3, reg4
stw reg4, *reg5++
[reg6]
add –1, reg6, reg6
[reg6]
b
loop
6-4
All directives and options that are described in the following sections are listed
in greater detail in Chapter 4 of the TMS320C6000 Optimizing C/C++ Compil-
er User's Guide .
Software pipelining requires the -o2 or -o3 option. Not specifying -o2 or -o3 fa-
cilitates faster compile time and ease of development through reduced opti-
mization.
Because the assembly optimizer has no idea where objects you are accessing
are located when you perform load and store instructions, the assembly opti-
mizer is by default very conservative in determining dependencies between
memory operations. For example, let us say you have the following loop de-
fined in a linear assembly file:
The assembly optimizer will make sure that each store to "reg5" completes be-
fore the next load of "reg1". A suboptimal loop would result if the store to ad-
dress in reg5 in not in the next location to be read by "reg1". For loops where
"reg5" is pointing to the next location of "reg1", this is necessary and implies
that the loop has a loop carry path. See section 6.7, Loop Carry Paths, on page
6-77 for more information.
For most loops, this is not the case, and you can inform the assembly optimizer
to be more aggressive about scheduling memory operations. You can do this
either by including the ".no_mdep" (no memory dependencies) directive in
your linear assembly function or with the -mt option when you are compiling
the linear assembly file. Be aware that if you are compiling both C code and
linear assembly code in your application, that the -mt option has different
meanings for both C and linear assembly code. In this case, use the .no_mdep
directive in your linear assembly source files.

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TMS320C6000 and is the answer not in the manual?

Questions and answers

Table of Contents