Live-Too-Long Issues - Texas Instruments TMS320C6000 Programmer's Manual

Hide thumbs Also See for TMS320C6000:
Table of Contents

Advertisement

6.10 Live-Too-Long Issues

6.10.1 C Code With Live-Too-Long Problem
Example 6–56. Live-Too-Long C Code
int live_long(short a[],short b[],short c, short d, short e)
{
int i,sum0,sum1,sum,a0,a2,a3,b0,b2,b3;
short a1,b1;
sum0 = 0;
sum1 = 0;
for(i=0; i<100; i++){
a0 = a[i] * c;
a1 = a0 >> 15;
a2 = a1 * d;
a3 = a2 + a0;
sum0 += a3;
b0 = b[i] * c;
b1 = b0 >> 15;
b2 = b1 * e;
b3 = b2 + b0;
sum1 += b3;
}
sum = sum0 + sum1;
return(sum);
}
When the result of a parent instruction is live longer than the minimum iteration
interval of a loop, you have a live-too-long problem. Because each instruction
executes every iteration interval cycle, the next iteration of that parent over-
writes the register with a new value before the child can read it. Section 6.6.6.1,
Resource Conflicts, on page 6-65 showed how to solve this problem simply
by moving the parent to a later cycle. This is not always a valid solution.
Example 6–56 shows C code with a live-too-long problem that cannot be
solved by rescheduling the parent instruction. Although it is not obvious from
the C code, the dependency graph in Figure 6–19 on page 6-103 shows a split-
join path that causes this live-too-long problem.
Optimizing Assembly Code via Linear Assembly
Live-Too-Long Issues
6-101

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