Re: [PATCH] tree-optimization/109237 - last_stmt is possibly slow

2023-03-26 Thread Jeff Law via Gcc-patches
On 3/22/23 06:29, Richard Biener via Gcc-patches wrote: Most uses of last_stmt are interested in control transfer stmts and for the testcase gimple_purge_dead_eh_edges shows up in the profile. But last_stmt looks past trailing debug stmts but those would be rejected by GIMPLEs verify_flow_inf

Re: [PATCH] tree-optimization/109237 - last_stmt is possibly slow

2023-03-22 Thread Bernhard Reutner-Fischer via Gcc-patches
On 22 March 2023 13:29:52 CET, Richard Biener via Gcc-patches wrote: >The alternative would be to change last_stmt, explicitely introducing >last_nondebug_stmt. I remember we chickened out and made last_stmt >conservative here but not anticipating the compile-time issues this >creates. I count

Re: [PATCH] tree-optimization/109237 - last_stmt is possibly slow

2023-03-22 Thread Jakub Jelinek via Gcc-patches
On Wed, Mar 22, 2023 at 12:29:52PM +, Richard Biener wrote: > Most uses of last_stmt are interested in control transfer stmts > and for the testcase gimple_purge_dead_eh_edges shows up in > the profile. But last_stmt looks past trailing debug stmts but > those would be rejected by GIMPLEs veri

[PATCH] tree-optimization/109237 - last_stmt is possibly slow

2023-03-22 Thread Richard Biener via Gcc-patches
Most uses of last_stmt are interested in control transfer stmts and for the testcase gimple_purge_dead_eh_edges shows up in the profile. But last_stmt looks past trailing debug stmts but those would be rejected by GIMPLEs verify_flow_info. The following adds possible_ctrl_stmt besides last_stmt w