more stuff with phi and ir emit