Add factory compiler pass