This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I found that there are differences about code size between CLA and CPU as shown below.
code |
code size when loaded in CLA |
code size when loaded in CPU |
sVar.sMem1[0].fd=sVar.sMem2[0].fa * sVar.sMem3[0].sData.fb + sVar.sMem3[0].sData.fc |
254 |
42 |
sVar.sMem1[0].fd=sVar.sMem1[0].fa * sVar.sMem1[0].fb + sVar.sMem1[0].fc |
66 |
41 |
sVar.fd=sVar.fa * sVar.fb + sVar.fc |
20 |
19 |
fd = fa * fb + fc; |
20 |
19 |
fa, fb, fc, fd are float variables.
The code size in CLA is much greater than that in CPU, especially when complex struct variable are used.
Why?
Is there any way to reduce the code size in CLA?
Hello,
Please see this discussion regarding C28x/CLA codesize comparisons.
Regards
Lori
Hi,
So, there are differences about addressing modes between CLA and CPU. And in most cases, the code size in CLA is larger than that in CPU.
For my case, is there any way to reduce the code size in CLA? Could you give me some advice? I want to keep the structure variable definition if possible.
For the CLA source file that has the worst code size problems, please follow the directions in the article How to Submit a Compiler Test Case. I'll use that test case to get a better understanding of the generated code. I may be able to make some suggestions for improvement. Or, it might uncover a problem in the compiler. Or, something like that.
Thanks and regards,
-George