More work toward support for functions in the IR and IR-based cross-compiler