extern-call-in-bodyThe loop body calls an external function
Reported by --explain after a verdict.
mettle explain extern-call-in-body
The body calls a function declared extern. The compiler has no body for it, so it can never inline the call away, and the loop can never vectorize while the call is there.
Fix: move the extern call out of the loop. Where the loop computes the values and the extern call only consumes them, split it in two: a vectorizable loop that fills a buffer, then one call.
Related
- call-in-bodyThe loop body calls a function
- indirect-callThe loop body calls through a function pointer
- alloc-in-bodyThe loop body allocates
- inline-asmThe loop body contains inline assembly
- control-flowThe loop body branches
- early-exitThe loop can leave before its trip count
- int16-elements16-bit integer elements have no kernel
- int64-elements64-bit integer elements have no kernel