Don't enable PGO-related options if .gcda file is not found.
@TC-440
gcc/
* common.opt (profile_file_name): New variable.
* toplev.c (do_compile): Pass it into coverage_init.
* opts.c: Include gcov-io.h.
(common_handle_option): Factor out enabling PGO-related
optimizations into separate function. Defer enabling these
optimizations until we know if corresponding .gcda file exists.
(maybe_setup_aux_base_name): New function.
(setup_coverage_filename): Likewise.
(enable_fdo_optimizations): Likewise.
(finish_options): Call maybe_setup_aux_base_name and setup coverage
filename. Enable PGO-related optimizations if corresponding .gcda file
exists.
* coverage.c (coverage_init): Adjust to use profile_file_name.
Change-Id: Ib085add4697d2a37a38d069a37818fdf53bb9f77