On 11/22/23 06:14, Maxim Kuvyrkov wrote:
We currently have 3 implementations of print_hard_reg_set()
(all with the same name!) in ira-color.cc, ira-conflicts.cc, and
sel-sched-dump.cc.  This patch generalizes implementation in
ira-color.cc, and uses it in all other places.  The declaration
is added to hard-reg-set.h.

The motivation for this patch is the [upcoming] need for
print_hard_reg_set() in sched-deps.cc.

gcc/ChangeLog:

        * hard-reg-set.h (print_hard_reg_set): Declare.
        * ira-color.cc (print_hard_reg_set): Generalize a bit.
        (debug_hard_reg_set, print_hard_regs_subforest,)
        (setup_allocno_available_regs_num): Update.
        * ira-conflicts.cc (print_hard_reg_set): Remove.
        (print_allocno_conflicts): Use global print_hard_reg_set().
        * sel-sched-dump.cc (print_hard_reg_set): Remove.
        (dump_hard_reg_set): Use global print_hard_reg_set().
        * sel-sched-dump.h (dump_hard_reg_set): Mark as DEBUG_FUNCTION.

OK for me.  Thank you for consolidation of the print code, Maxim.


Reply via email to