Apply a set of hand-picked optimisation passes known to be safe.