diff options
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 902eb95..5518d40 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -1907,7 +1907,7 @@ copy_bb (copy_body_data *id, basic_block bb, int frequency_scale, gsi_replace (©_gsi, new_call, false); stmt = new_call; } - else if (is_gimple_call (stmt) + else if (call_stmt && id->call_stmt && (decl = gimple_call_fndecl (stmt)) && DECL_BUILT_IN_CLASS (decl) == BUILT_IN_NORMAL @@ -1934,6 +1934,15 @@ copy_bb (copy_body_data *id, basic_block bb, int frequency_scale, gsi_replace (©_gsi, new_stmt, false); stmt = new_stmt; } + else if (call_stmt + && id->call_stmt + && gimple_call_internal_p (stmt) + && gimple_call_internal_fn (stmt) == IFN_TSAN_FUNC_EXIT) + { + /* Drop TSAN_FUNC_EXIT () internal calls during inlining. */ + gsi_remove (©_gsi, false); + continue; + } /* Statements produced by inlining can be unfolded, especially when we constant propagated some operands. We can't fold |