]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/106938 - cleanup abnormal edges after inlining
authorRichard Biener <rguenther@suse.de>
Wed, 14 Sep 2022 11:53:56 +0000 (13:53 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 14 Sep 2022 12:50:36 +0000 (14:50 +0200)
commitcd14c97cd92ca11c66ee3d8dc4dd543c5aa8e024
tree9936c7b2d0245ae14a1ec0eb179adc356eea8a67
parent12a8d5e2f2e7d7535115e4e105c0f9eb4d50fdad
tree-optimization/106938 - cleanup abnormal edges after inlining

After inlining and IPA transforms we run fixup_cfg to fixup CFG
effects in other functions.  But that fails to clean abnormal
edges from non-pure/const calls which might no longer be necessary
when ->calls_setjmp is false.  The following ensures this happens
and refactors things so we call EH/abnormal cleanup only on the
last stmt in a block.

PR tree-optimization/106938
* tree-cfg.cc (execute_fixup_cfg): Purge dead abnormal
edges for all last stmts in a block.  Do EH cleanup
only on the last stmt in a block.

* gcc.dg/pr106938.c: New testcase.
gcc/testsuite/gcc.dg/pr106938.c [new file with mode: 0644]
gcc/tree-cfg.cc