An analysis of post-selection in automatic tuning