Fix build: add missing typedef for ir_phase and more s/phase_t/ir_phase/