refactor compiler pass