spmd_compile: fix return generation

It can't actually return from the function, but just conditionally
sets the result local variable.
spmd_compile: turn up optimization level
spmd_compile: Return a vector intead of a pointer to vector