Hi,
I noticed that slsr_process_copy and slsr_process_cast are almost identical
and called only once.  This patch refactor the two functions into one.
For copies, it also passes lhs' type to creation of new cand assuming that
lhs, rhs and base_cand have the same/compatible type.  I will keep an eye
on this in case of any fallouts.

Bootstrap and test on x86_64.  Is it OK?

Thanks,
bin

2019-05-15  Bin Cheng  <bin.ch...@linux.alibaba.com>

        * gimple-ssa-strength-reduction.c (slsr_process_cast): Refactor into
        (slsr_process_copycast): ...this.
        (slsr_process_copy): Delete.
        (find_candidates_dom_walker::before_dom_children): Call the refactor
        function slsr_process_copycast.

Attachment: 0002-Factor-slsr-process-of-copy-and-cast.patch
Description: Binary data

Reply via email to