Go patch committed: Default to -fno-partial-inlining

Message ID CAOyqgcVRN6eXT+r2O6gYJq60PGiCkPL3Sf=jmE5S_fPL5uqNBA@mail.gmail.com
State New
Headers show
  • Go patch committed: Default to -fno-partial-inlining
Related show

Commit Message

Ian Lance Taylor Sept. 5, 2019, 4:12 a.m.
This patch to the Go frontend defaults to -fno-partial-inlining.  This
is to work around PR 91663: a case in which a function is split for
partial inlining, and then the two functions are inlined together into
a single function, leading to a confusing stack trace.  This doesn't
work for Go since it expects reliable stack traces.  We may be able to
undo this patch later if PR 91663 is fixed.  This patch bootstrapped
and ran Go testsuite on x86_64-pc-linux-gnu.  Committed to mainline.


2019-09-04  Ian Lance Taylor  <iant@golang.org>

PR tree-optimization/91663
* go-lang.c (go_langhook_post_options): Clear


Index: go-lang.c
--- go-lang.c	(revision 275351)
+++ go-lang.c	(working copy)
@@ -300,6 +300,11 @@  go_langhook_post_options (const char **p
   if (!global_options_set.x_flag_optimize_sibling_calls)
     global_options.x_flag_optimize_sibling_calls = 0;
+  /* Partial inlining can confuses uses of runtime.Callers.
+     See https://gcc.gnu.org/PR91663.  */
+  if (!global_options_set.x_flag_partial_inlining)
+    global_options.x_flag_partial_inlining = 0;
   /* If the debug info level is still 1, as set in init_options, make
      sure that some debugging type is selected.  */
   if (global_options.x_debug_info_level == DINFO_LEVEL_TERSE