This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[lra] pseudo assignment improvements


For this month I tried many different heuristics of spilling and assignment in LRA (about 10 of them, including spilling for inheritance reloads). Here is the best what I found. The major idea is to assign and spill for pseudos which are ordered by threads (set of reload pseudos connected by inheritance pseudos).

The patch mostly implements the new idea for assigning and spilling for reload pseudos. The patch also fixes a typo introduced in the previous patch which actually prohibited undo-inheritance subpass and resulted in worse code. The patch also fixes an insignificant valgrind error (reading uninitialized data).

The patch was successfully bootstrapped on x86/x86-64 and ppc64.

2011-09-29 Vladimir Makarov <vmakarov@redhat.com>

* lra-int.h (lra_get_copy): New prototype.

* lra.c (lra_get_copy): New function.

* lra-saves.c (lra_save_restore): Ignore scratches.

        * lra-constraints.c (remove_inheritance_pseudos): Fix a typo in
        checking remove_pseudos emptiness.

        * lra-assign.c (reload_insn_num): Remove.
        (struct regno_assign_info): New.
        (regno_assign_info): New array.
        (process_copy_to_form_allocno, init_regno_assign_info): New.
        (finish_regno_assign_info): New.
        (reload_pseudo_compare_func): Rewrite using threads.
        (find_hard_regno_for): Check value for conflicting reload pseudos.
        (spill_for): Use reload_pseudo_compare_func instead of
        pseudo_compare_func.
        (assign_by_spills): Print info about processed reload and
        inheritance pseudos.
        (lra_assign): Call init_regno_assign_info and
        finish_regno_assign_info.


Attachment: assignment-improvement.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]