From d0bf921f6a0b8ffdad74fa5eb5ddf2e70a9acfd6 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 18 Jan 2019 11:07:27 +0100 Subject: re PR tree-optimization/86214 (Strongly increased stack usage) PR tree-optimization/86214 * tree-inline.h (struct copy_body_data): Add add_clobbers_to_eh_landing_pads member. * tree-inline.c (add_clobbers_to_eh_landing_pad): New function. (copy_edges_for_bb): Call it if EH edge destination is < id->add_clobbers_to_eh_landing_pads. Fix a comment typo. (expand_call_inline): Set id->add_clobbers_to_eh_landing_pads if flag_stack_reuse != SR_NONE and clear it afterwards. * g++.dg/opt/pr86214-1.C: New test. * g++.dg/opt/pr86214-2.C: New test. From-SVN: r268067 --- gcc/tree-inline.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/tree-inline.h') diff --git a/gcc/tree-inline.h b/gcc/tree-inline.h index f09e2b4..11f596e 100644 --- a/gcc/tree-inline.h +++ b/gcc/tree-inline.h @@ -155,6 +155,12 @@ struct copy_body_data /* A list of addressable local variables remapped into the caller when inlining a call within an OpenMP SIMD-on-SIMT loop. */ vec *dst_simt_vars; + + /* 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 + of basic blocks in the caller before inlining. Zero otherwise. */ + int add_clobbers_to_eh_landing_pads; }; /* Weights of constructions for estimate_num_insns. */ -- cgit v1.1