A Boltzmann machine approach to code optimization