diff options
Diffstat (limited to 'gcc/opts.cc')
-rw-r--r-- | gcc/opts.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/opts.cc b/gcc/opts.cc index 6ca1ec7..063fbd0 100644 --- a/gcc/opts.cc +++ b/gcc/opts.cc @@ -1411,11 +1411,14 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set, opts->x_debug_info_level = DINFO_LEVEL_NONE; } + /* Also enable markers with -fauto-profile even when debug info is disabled, + so we assign same discriminators and can read back the profile info. */ if (!opts_set->x_debug_nonbind_markers_p) opts->x_debug_nonbind_markers_p = (opts->x_optimize - && opts->x_debug_info_level >= DINFO_LEVEL_NORMAL - && (dwarf_debuginfo_p (opts) || codeview_debuginfo_p ()) + && ((opts->x_debug_info_level >= DINFO_LEVEL_NORMAL + && (dwarf_debuginfo_p (opts) || codeview_debuginfo_p ())) + || opts->x_flag_auto_profile) && !(opts->x_flag_selective_scheduling || opts->x_flag_selective_scheduling2)); |