On 11/13/20 1:12 AM, Richard Sandiford via Gcc-patches wrote: > noop_move_p currently keeps any instruction that has a REG_EQUAL > note, on the basis that the equality might be useful in future. > But this creates a perverse incentive not to add potentially-useful > REG_EQUAL notes, in case they prevent an instruction from later being > removed as dead. > > The condition originates from flow.c:life_analysis_1 and predates > the changes tracked by the current repository (1992). It probably > made sense when most optimisations were done on RTL rather than FE > trees, but it seems counterproductive now. > > gcc/ > * rtlanal.c (noop_move_p): Don't check for REG_EQUAL notes. I would guess this was primarily for the old libcall mechanism where we'd have a self-copy at the end of the sequence with a REG_EQUAL note for the expression's natural form. All that's been broken for a long time. So I'm not going to lose any sleep if we want to remove this little chunk of code. OK jeff
- [00/23] Make fwprop use an on-the-side R... Richard Sandiford via Gcc-patches
- [01/23] vec: Silence clang warning Richard Sandiford via Gcc-patches
- Re: [01/23] vec: Silence clang ... Jeff Law via Gcc-patches
- [03/23] reginfo: Add a global_reg_s... Richard Sandiford via Gcc-patches
- Re: [03/23] reginfo: Add a glob... Jeff Law via Gcc-patches
- [02/23] rtlanal: Remove noop_move_p... Richard Sandiford via Gcc-patches
- Re: [02/23] rtlanal: Remove noo... Jeff Law via Gcc-patches
- [04/23] Move iterator_range to a ne... Richard Sandiford via Gcc-patches
- Re: [04/23] Move iterator_range... Jeff Law via Gcc-patches
- [05/23] Add more iterator utilities Richard Sandiford via Gcc-patches
- Re: [05/23] Add more iterator u... Jeff Law via Gcc-patches
- [07/23] Add a class that multiplexe... Richard Sandiford via Gcc-patches
- Re: [07/23] Add a class that mu... Jeff Law via Gcc-patches
- Re: [07/23] Add a class tha... Richard Sandiford via Gcc-patches
- Re: [07/23] Add a class... Jeff Law via Gcc-patches
- Re: [07/23] Add a class that mu... Martin Sebor via Gcc-patches
- Re: [07/23] Add a class tha... Richard Sandiford via Gcc-patches