Ion implantation of compound devices