]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-ssa-sink: Improve code sinking pass
authorAjit Kumar Agarwal <aagarwa1@linux.ibm.com>
Wed, 8 May 2024 14:21:27 +0000 (09:21 -0500)
committerAjit Kumar Agarwal <aagarwa1@linux.ibm.com>
Wed, 8 May 2024 14:23:45 +0000 (09:23 -0500)
commitf4b86ab09dfe258c4780fcc7567ca8a275c96e7a
tree321c92523ef91f72ff7fcbf6c8922aba59946fb9
parent3ee30d7981987b86bd6a9a2675e26fadec48e5cd
tree-ssa-sink: Improve code sinking pass

Currently, code sinking will sink code at the use points with loop having same
nesting depth. The following patch improves code sinking by placing the sunk
code in begining of the block after the labels.

2024-05-08  Ajit Kumar Agarwal  <aagarwa1@linux.ibm.com>

gcc/ChangeLog:

PR tree-optimization/81953
* tree-ssa-sink.cc (statement_sink_location):Sink statements at
the begining of the basic block after labels.

gcc/testsuite/ChangeLog:

PR tree-optimization/81953
* gcc.dg/tree-ssa/ssa-sink-21.c: New test.
gcc/testsuite/gcc.dg/tree-ssa/ssa-sink-21.c [new file with mode: 0644]
gcc/tree-ssa-sink.cc