Compiler Advice (on TI Wiki)

Advice 27000: Use Optimization Options
Advice 27001: Increase Optimization Level
Advice 27002: Do not turn off software pipelining
Advice 27003: Avoid compiling with debug options
Advice 27004: No Performance Advice generated
Advice 30000: Prevent Loop Disqualification due to call
Advice 30001: Prevent Loop Disqualification due to rts-call
Advice 30002: Prevent Loop Disqualification due to asm statement
Advice 30003: Prevent Loop Disqualification due to complex condition
Advice 30004: Prevent Loop Disqualification due to switch statement
Advice 30005: Prevent Loop Disqualification due to arithmetic operation
Advice 30006: Prevent Loop Disqualification due to call(2)
Advice 30007: Prevent Loop Disqualification due to rts-call(2)
Advice 30008: Improve Loop; Qualify with restrict
Advice 30009: Improve Loop; Add MUST_ITERATE pragma
Advice 30010: Improve Loop; Add MUST_ITERATE pragma(2)
Advice 30011: Improve Loop; Add _nassert()

Typical Advice

 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.

Why is the Compiler giving this Advice?

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.


What it means:

The compiler inserts calls to special functions in the run-time support library (RTS) to support operations that are not natively supported by the instruction set architecture (ISA). C6000 fixed point ISAs do not support floating-point instructions and the compiler will generate a call to an RTS routine to carry out the floating point operation. In the example below the floating-point multiplication is unavailable for a fixed-point device such as C6200:
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.


Risks, Severity

If your code is left as-is, the compiler cannot perform the software pipelining loop optimization, which is crucial to getting good performance


Suggested Action

Rewrite or use fixed point operation.

More Resources

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.

Go to the TI Compiler's e2e online forum! 

E2e.jpg For technical support please post your questions at http://e2e.ti.com.