Mettle

call-in-bodyThe loop body calls a function

Reported by --explain after a verdict.

mettle explain call-in-body

A SIMD kernel runs eight lanes at once. A call runs one. So a loop that calls anything on every iteration cannot become a kernel until the call is gone.

The inliner runs first and removes most of these on its own, so a loop that still reports this one has a call the inliner declined. The remark for that call, on the same line, says which rule stopped it.

Fix: mark the callee @inline, or lift the call out of the loop when its result does not change between iterations.

Related