Add some stats to CodeGenPrepare to make it easier to speed it up without