On 10/03/2018 10:09 AM, Peter Bergner wrote:
Here is another updated PATCH 2 that is the same as the previous version,
but includes the modification to the expected output of i386/pr49095.c
test case, as H.J. has confirmed the code gen changes we are seeing on
are a good thing.
This patch completed bootstrap and regtesting on powerpc64le-linux,
x86_64-linux and i686-linux (Thanks H.J.!) with no regressions.
Ok for trunk?
The patch is ok for the trunk. Only very minor comments.
IMHO, the name copy_insn_p is too common and confusing (we already have
functions copy_insn and copy_insn_1 in GCC). The name does not reflect
its result meaning. I would call it something like
non_conflict_copy_source_reg although it is long.
Also I would rename last_regno to bound_regno because it is better
reflect variable value meaning or at least to end_regno as it is a value
of END_REGNO macro.
But you can ignore these insignificant comments.
Peter, thank you for working on the issue. The patches may be solve
more PRs you mentioned.
gcc/
PR rtl-optimization/86939
PR rtl-optimization/87479
* ira.h (copy_insn_p): New prototype.
* ira-lives.c (ignore_reg_for_conflicts): New static variable.
(make_hard_regno_dead): Don't add conflicts for register
ignore_reg_for_conflicts.
(make_object_dead): Likewise.
(copy_insn_p): New function.
(process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
* lra-lives.c (ignore_reg_for_conflicts): New static variable.
(make_hard_regno_dead): Don't add conflicts for register
ignore_reg_for_conflicts. Remove special conflict handling of
REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
check_pic_pseudo_p and update callers.
(mark_pseudo_dead): Don't add conflicts for register
ignore_reg_for_conflicts.
(process_bb_lives): Set ignore_reg_for_conflicts for copies.
gcc/testsuite/
* gcc.target/powerpc/pr86939.c: New test.
* gcc/testsuite/gcc.target/i386/pr49095.c: Fix expected results.