PR rtl-opt/38582
commit7197e17802ace9fc937f5b58f171a3711920b0dd
authorbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 26 Nov 2009 21:41:42 +0000 (26 21:41 +0000)
committerbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 26 Nov 2009 21:41:42 +0000 (26 21:41 +0000)
tree949d7357876cb59c5ee333ce2b11bbf51a4c5ec6
parentde67d37ee4017a6537995c5aab5ae4dce7bb4d10
PR rtl-opt/38582
* regrename.c (struct du_head): New members id, conflicts,
hard_conflicts and cannot_rename.
(enum scan_actions): Remove terminate_all_read and
terminate_overlapping_read; add mark_all_read.
(scan_actions_name): Likewise.
(du_head_p): New typedef.  Define a vector type for it.
(id_to_chain): New static variable.
(note_sets, clear_dead_regs): Delete functions.
(free_chain_data): New function.
(merge_overlapping_regs): Simply walk the conflicts bitmap.
Remove argument B, all callers changed.
(regrename_optimize): Allocate id_to_chain.  Ignore chains that have
the cannot_rename bit set.  Update regno and nregs of a renamed chain.
Call free_chain_data when done.
(do_replace): Remove death notes when the renamed reg is set in the
last insn; add them if not.
(mark_conflict, note_sets_clobbers): New static function.
(fail_current_block, current_id, open_chains_set, live_hard_regs): New
static variables.
(scan_rtx_reg): Keep track of conflicts between chains, and between
chains and hard regs.  Don't terminate chains when we find a read we
can't handle, mark it unrenameable instead.  For terminate_write,
terminate chains that are written with an exact match or a superset
of registers.  Set fail_current_block if multi-word lifetimes are too
complex to handle.
(scan_rtx_address): Use mark_all_read instead of terminate_all_read.
(build_def_use): Initialize current_id, live_chains and live_hard_regs;
free memory for them when done.
Rearrange the steps so that earlyclobbers are noted before reads
are processed.  Add new steps to keep track of hard register lifetimes
outside insn operands.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154688 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/regrename.c