Here's an updated version of the patchkit to enable autofdo bootstrap and testing. It also fixes some autofdo issues. The last patch is more a workaround (to make autofdo bootstrap not ICE), but may need a better fix.
The main motivation is to get better test coverage for autofdo and also an useful benchmark (speed of generated compiler) for it. If you want the absolutely fastest compiler using profiledbootstrap is still the way to go. I addressed most of the earlier review comments. The python script is still python 2 for better compatibility with old systems. Ok to commit?