moving compiler specific utils into compiler