2016-08-02 Vladimir Makarov <vmakarov@redhat.com>
commitab4ea053bf71c5571df344d5d5f5bd7ecc5ede8e
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Aug 2016 16:07:36 +0000 (2 16:07 +0000)
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 2 Aug 2016 16:07:36 +0000 (2 16:07 +0000)
tree7c2848d5a635da4f8a9ad968219e25a2afa416ff
parentfa6c06f5770c0a5c0018533ea57abaefa0e99153
2016-08-02  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/69847
* lra-int.h (struct lra-reg): Use restore_rtx instead of
restore_regno.
(lra_rtx_hash): New.
* lra.c (initialize_lra_reg_info_element): Use restore_rtx instead
of restore_regno.
(lra_rtx_hash): Rename and move lra-remat.c::rtx_hash.
* lra-remat.c (rtx_hash): Rename and Move to lra.c.
* lra-spills.c (lra_final_code_change): Don't delete insn when the
next insn is USE with the same reg as the current insn source.
* lra-constraints.c (curr_insn_transform): Use restore_rtx instead
of restore_regno.
(lra_constraints_init): Call initiate_invariants.
(lra_constraints_finish): Call finish_invariants.
(struct invariant, invariant_t, invariant_ptr_t): New.
(const_invariant_ptr_t, invariants, invariants_pool): New.
(invariant_table, invariant_hash, invariant_eq_p): New.
(insert_invariant, initiate_invariants, finish_invariants): New.
(clear_invariants, invalid_invariant_regs): New.
(inherit_reload_reg, split_reg, fix_bb_live_info): Use restore_rtx
instead of restore_regno.
(invariant_p, process_invariant_for_inheritance): New.
(inherit_in_ebb): Implement invariant inheritance.
(lra_inheritance): Initialize and finalize invalid_invariant_regs.
(remove_inheritance_pseudos): Implement undoing invariant
inheritance.
(undo_optional_reloads, lra_undo_inheritance): Use restore_rtx
instead of restore_regno.
* lra-assigns.c (regno_live_length): New.
(reload_pseudo_compare_func): Use regno_live_length.
(assign_by_spills): Use restore_rtx instead of restore_regno.
(lra_assign): Ditto.  Initiate regno_live_length.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238991 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/lra-assigns.c
gcc/lra-constraints.c
gcc/lra-int.h
gcc/lra-remat.c
gcc/lra-spills.c
gcc/lra.c