RFC: LRA for x86/x86-64 [5/9]

Vladimir Makarov vmakarov@redhat.com
Thu Sep 27 22:59:00 GMT 2012


   The following patch mostly prepares some data from IRA which will be
used by LRA.  It is done by moving some definitions fro ira-int.h to
ira.h.  New data reg_class_subset is generated in IRA for LRA.
New functions dealing with equivs are created.  They will be used by
LRA.  Some code of IRA is rewritten to use them too.

   The patch also adds a wrapper code in IRA to be prepared to call
LRA.

2012-09-27  Vladimir Makarov  <vmakarov@redhat.com>

     * ira-int.h (struct target_ira_int): Remove x_ira_class_subset_p
     and x_ira_reg_classes_intersect_p.
     (ira_class_subset_p, ira_reg_classes_intersect_p): Remove.
     (ira_reg_equiv_len, ira_reg_equiv_invariant_p): Ditto.
     (ira_reg_equiv_const): Ditto.
     (ira_equiv_no_lvalue_p): New function.
     * ira-color.c (color_pass, move_spill_restore, coalesce_allocnos):
     Use ira_equiv_no_lvalue_p.
     (coalesce_spill_slots, ira_sort_regnos_for_alter_reg): Ditto.
     * ira-emit.c (ira_create_new_reg): Call ira_expand_reg_equiv.
     (generate_edge_moves, change_loop) Use ira_equiv_no_lvalue_p.
     (emit_move_list): Simplify code.  Call
     ira_update_equiv_info_by_shuffle_insn.  Use ira_reg_equiv instead
     of ira_reg_equiv_invariant_p and ira_reg_equiv_const. Change
     assert.
     * ira.c: (setup_reg_class_relations): Set up ira_reg_class_subset.
     (ira_reg_equiv_invariant_p, ira_reg_equiv_const): Remove.
     (find_reg_equiv_invariant_const): Ditto.
     (setup_reg_renumber): Use ira_equiv_no_lvalue_p instead
     of ira_reg_equiv_invariant_p.  Skip caps for LRA.
     (setup_reg_equiv_init, ira_update_equiv_info_by_shuffle_insn): New
     functions.
     (ira_reg_equiv_len): Move it before ira_reg_equiv. Change
     comment.
     (ira_reg_equiv): New.
     (ira_expand_reg_equiv, finish_reg_equiv): New functions.
     (no_equiv, update_equiv_regs): Use ira_reg_equiv instead of
     reg_equiv_init.
     (setup_reg_equiv): New function.
     (ira_use_lra_p): New global.
     (ira): Move initialization of ira_obstack and ira_bitmap_obstack
     upper.  Call init_reg_equiv, setup_reg_equiv, and
     setup_reg_equiv_init instead of initialization of
     ira_reg_equiv_len, ira_reg_equiv_invariant_p, and
     ira_reg_equiv_const.  Don't flatten IRA IRA for LRA. Don't
     reassign conflict allocnos for LRA. Call finish_reg_equiv.
         (do_reload): Prepare code for LRA call.
     * ira.h (ira_use_lra_p): New external.
     (struct target_ira): Add members x_ira_class_subset_p
     x_ira_reg_class_subset, and x_ira_reg_classes_intersect_p.
     (ira_class_subset_p, ira_reg_class_subset): New macros.
     (ira_reg_classes_intersect_p): New macro.
     (ira_reg_equiv_len, ira_reg_equiv): New externals.
     (struct ira_reg_equiv): New.
     (ira_expand_reg_equiv, ira_update_equiv_info_by_shuffle_insn): New
     prototypes.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 5.patch
Type: text/x-patch
Size: 37799 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120927/b97e1c9a/attachment.bin>


More information about the Gcc-patches mailing list