aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-05-08 19:06:46 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2019-05-08 19:06:46 +0200
commitab87ac8d53f3d903bfc9eeb0f0b5e7eed1f38cbc (patch)
tree82cfaff6222e92d237be7a60aa9a5c1f2f835b38 /gcc/tree-inline.h
parent69708e0afbf3a3757b9f689bb54acff1d7e8d9ec (diff)
downloadgcc-ab87ac8d53f3d903bfc9eeb0f0b5e7eed1f38cbc.zip
gcc-ab87ac8d53f3d903bfc9eeb0f0b5e7eed1f38cbc.tar.gz
gcc-ab87ac8d53f3d903bfc9eeb0f0b5e7eed1f38cbc.tar.bz2
re PR c++/59813 (tail-call elimination didn't fire for left-shift of char to cout)
PR c++/59813 PR tree-optimization/89060 * tree-ssa-live.h (live_vars_map): New typedef. (compute_live_vars, live_vars_at_stmt, destroy_live_vars): Declare. * tree-ssa-live.c: Include gimple-walk.h and cfganal.h. (struct compute_live_vars_data): New type. (compute_live_vars_visit, compute_live_vars_1, compute_live_vars, live_vars_at_stmt, destroy_live_vars): New functions. * tree-tailcall.c: Include tree-ssa-live.h. (live_vars, live_vars_vec): New global variables. (find_tail_calls): Perform variable life analysis before punting. (tree_optimize_tail_calls_1): Clean up live_vars and live_vars_vec. * tree-inline.h (struct copy_body_data): Add eh_landing_pad_dest member. * tree-inline.c (add_clobbers_to_eh_landing_pad): Remove BB argument. Perform variable life analysis to select variables that really need clobbers added. (copy_edges_for_bb): Don't call add_clobbers_to_eh_landing_pad here, instead set id->eh_landing_pad_dest and assert it is the same. (copy_cfg_body): Call it here if id->eh_landing_pad_dest is non-NULL. * gcc.dg/tree-ssa/pr89060.c: New test. From-SVN: r271013
Diffstat (limited to 'gcc/tree-inline.h')
-rw-r--r--gcc/tree-inline.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-inline.h b/gcc/tree-inline.h
index 9e3c249..4c954a0 100644
--- a/gcc/tree-inline.h
+++ b/gcc/tree-inline.h
@@ -160,6 +160,10 @@ struct copy_body_data
when inlining a call within an OpenMP SIMD-on-SIMT loop. */
vec<tree> *dst_simt_vars;
+ /* Basic block to which clobbers for local variables from the inline
+ function that need to live in memory should be added. */
+ basic_block eh_landing_pad_dest;
+
/* If clobbers for local variables from the inline function
that need to live in memory should be added to EH landing pads
outside of the inlined function, this should be the number