$ mlir-opt 04_kernel.mlir --pass-pipeline="$LOWER_STD" | mlir-translate --mlir-to-llvmir -o out/saxpy.ll && grep -E '^define' out/saxpy.ll
define void @saxpy(float %0, ptr %1, ptr %2, i64 %3, i64 %4, i64 %5, ptr %6, ptr %7, i64 %8, i64 %9, i64 %10) {
define void @_mlir_ciface_saxpy(float %0, ptr %1, ptr %2) {$ sed -n '/_mlir_ciface_saxpy/,/^}/p' out/saxpy.ll | sed -n '1,3p;15,17p'
define void @_mlir_ciface_saxpy(float %0, ptr %1, ptr %2) {
%4 = load { ptr, ptr, i64, [1 x i64], [1 x i64] }, ptr %1, align 8
%5 = extractvalue { ptr, ptr, i64, [1 x i64], [1 x i64] } %4, 0
ret void
}The wrapper loads each descriptor struct, splats it into 5 scalars, and calls the real function. After -O2 inlining it costs nothing.