spmd_compile: add support for function arguments