This is not a review of the patch itself, but...

On 5/31/23 2:01 AM, Ajit Agarwal wrote:
> tree-ssa-sink: Improve code sinking pass
> 
> Code Sinking sinks the blocks after call.This increases register pressure
> for callee-saved registers. Improves code sinking before call in the use
> blocks or immediate dominator of use blocks.

I think the wording of your git log comment could be improved a little.
How about something like the following?

Currently, code sinking will sink code after function calls.  This increases
register pressure for callee-saved registers.  The following patch improves
code sinking by placing the sunk code before calls in the use block or in
the immediate dominator of the use blocks.



> gcc/ChangeLog:
> 
>       * tree-ssa-sink.cc (statement_sink_location): Move statements before
>       calls.
>       (def_use_same_block): New function.
>       (select_best_block): Add heuristics to select the best blocks in the
>       immediate post dominator.
> 
> gcc/testsuite/ChangeLog:
> 
>       * gcc.dg/tree-ssa/ssa-sink-20.c: New testcase.
>       * gcc.dg/tree-ssa/ssa-sink-21.c: New testcase.

Please don't forget to add "PR tree-optimization/81953" to both sections
of the ChangeLog entries.

Peter


Reply via email to