Compiling C/C++ Code
3-11
Optimizing C/C++ Code
3.2.2.2
The –mt Option
Another way to eliminate memory dependencies is to use the –mt option,
which allows the compiler to use assumptions that can eliminate memory de-
pendency paths. For example, if you use the –mt option when compiling the
code in Example 3–1, the compiler uses the assumption that that in1 and in2
do not alias memory pointed to by sum and, therefore, eliminates memory de-
pendencies among the instructions that access those variables.
If your code does not follow the assumptions generated by the –mt option, you
can get incorrect results. For more information on the –mt option refer to the
TMS320C6000 Optimizing Compiler User’s Guide (SPRU187).