fold_constants takes an instruction vector instead of a whole function
replace another boost::unordered_map with the std equivalent