On Thu, Jan 9, 2020 at 2:35 PM Kwok Cheung Yeung <k...@codesourcery.com> wrote: > > Hello > > On 09/12/2019 8:01 am, Richard Biener wrote: > > > > The stream-in code has > > > > /* If we're recompiling LTO objects with debug stmts but > > we're not supposed to have debug stmts, remove them now. > > We can't remove them earlier because this would cause uid > > mismatches in fixups, but we can do it at this point, as > > long as debug stmts don't require fixups. > > Similarly remove all IFN_*SAN_* internal calls */ > > if (!flag_wpa) > > { > > if (is_gimple_debug (stmt) > > && (gimple_debug_nonbind_marker_p (stmt) > > ? !MAY_HAVE_DEBUG_MARKER_STMTS > > : !MAY_HAVE_DEBUG_BIND_STMTS)) > > remove = true; > > /* In case the linemap overflows locations can be dropped > > to zero. Thus do not keep nonsensical inline entry > > markers > > we'd later ICE on. */ > > tree block; > > if (gimple_debug_inline_entry_p (stmt) > > && (block = gimple_block (stmt)) > > && !inlined_function_outer_scope_p (block)) > > remove = true; > > > > so can you please instead amend that or figure why it doesn't work? > > Thank you for pointing out that code. I have extended it to also strip > out the inline entry markers if debug_inline_points is false in the > accelerator compiler, which prevents execution from ever reaching the > assert. > > I have rerun the libgomp tests on AMD GCN with no regressions. Okay for > trunk?
OK. Thanks, Richard. > Thanks > > Kwok > > > 2020-01-09 Kwok Cheung Yeung <k...@codesourcery.com> > > gcc/ > * lto-streamer-in.c (input_function): Remove streamed-in inline debug > markers if debug_inline_points is false. > --- > gcc/lto-streamer-in.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c > index a8d67c4..3e64371 100644 > --- a/gcc/lto-streamer-in.c > +++ b/gcc/lto-streamer-in.c > @@ -1135,8 +1135,9 @@ input_function (tree fn_decl, class data_in *data_in, > we'd later ICE on. */ > tree block; > if (gimple_debug_inline_entry_p (stmt) > - && (block = gimple_block (stmt)) > - && !inlined_function_outer_scope_p (block)) > + && (((block = gimple_block (stmt)) > + && !inlined_function_outer_scope_p (block)) > + || !debug_inline_points)) > remove = true; > if (is_gimple_call (stmt) > && gimple_call_internal_p (stmt)) > -- > 2.8.1 >