move IR-level optimization flags into their own struct