extract some of the generic C-- optimisations from the NCG