diff options
author | Richard Biener <rguenther@suse.de> | 2024-05-22 09:16:51 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2024-05-24 13:01:14 +0200 |
commit | 5b9b3bae33cae7fca2e3c3e3028be6b8bee9b698 (patch) | |
tree | bda2b79d656706c6f880e01cb3da4b1b2ab43194 /gcc/cp/module.cc | |
parent | 51f4b47c4f4f61fe31a7bd1fa80e08c2438d76a8 (diff) | |
download | gcc-5b9b3bae33cae7fca2e3c3e3028be6b8bee9b698.zip gcc-5b9b3bae33cae7fca2e3c3e3028be6b8bee9b698.tar.gz gcc-5b9b3bae33cae7fca2e3c3e3028be6b8bee9b698.tar.bz2 |
tree-optimization/115144 - improve sinking destination choice
When sinking code closer to its uses we already try to minimize the
distance we move by inserting at the start of the basic-block. The
following makes sure to sink closest to the control dependence
check of the region we want to sink to as well as make sure to
ignore control dependences that are only guarding exceptional code.
This restores somewhat the old profile check but without requiring
nearly even probabilities. The patch also makes sure to not give
up completely when the best sink location is one we do not want to
sink to but possibly then choose the next best one.
PR tree-optimization/115144
* tree-ssa-sink.cc (do_not_sink): New function, split out
from ...
(select_best_block): Here. First pick valid block to
sink to. From that search for the best valid block,
avoiding sinking across conditions to exceptional code.
(sink_code_in_bb): When updating vuses of stores in
paths we do not sink a store to make sure we didn't
pick a dominating sink location.
* gcc.dg/tree-ssa/ssa-sink-22.c: New testcase.
Diffstat (limited to 'gcc/cp/module.cc')
0 files changed, 0 insertions, 0 deletions