advice #30007: Attempting to use floating-point operation "__mpyd" on fixed-point device, at line 5 (there may be other instances of this). Such calls reduce loop performance; use fixed point operation if possible.
The compiler needs to insert a special function call into your loop, which prevents the software-pipelining loop optimization. Software-pipelining is a key optimization for achieving good performance. You may see reduced performance without software pipelining.
void func(float *p, float *q, int n) { unsigned int i; for (i = 1; i < n; i++) { p[i] = (q[i] * 12.4) / p[i - 1]; } }
If compiled for C6200 (compiler option -mv6200) the compiler will use an RTS call to carry out the operation. Such a call will disable software pipelining. You can rewrite the operation/use a fixed point operation to prevent this.
If your code is left as-is, the compiler cannot perform the software pipelining loop optimization, which is crucial to getting good performance
Rewrite or use fixed point operation.
Want to squeeze a few more Performance Cycles out of your application? Leverage the e2e (Engineer-to-Engineer) online community to get all of your Advice questions answered! Or, give back to the community with your expertise.