On 5/8/23 00:43, Richard Biener wrote:
On Sat, May 6, 2023 at 8:46 PM Jeff Law via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
On 5/6/23 06:57, Roger Sayle wrote:
Following up on posts/reviews by Segher and Uros, there's some question
over why the middle-end's lower subreg pass emits a clobber (of a
multi-word register) into the instruction stream before emitting the
sequence of moves of the word-sized parts. This clobber interferes
with (LRA) register allocation, preventing the multi-word pseudo to
remain in the same hard registers. This patch eliminates this
(presumably superfluous) clobber and thereby improves register allocation.
Those clobbered used to help dataflow analysis know that a multi word
register was fully assigned by a subsequent sequence. I suspect they
haven't been terribly useful in quite a while.
Likely - maybe they still make a difference for some targets though.
It might be interesting to see whether combining the clobber with the
first set or making the set a multi-set with a parallel would be any
better?
Wrapping them inside a PARALLEL might be better, but probably isn't
worth the effort. I think all this stuff dates back to the era where we
had flow.c to provide the register lifetimes used by local-alloc. We
also had things like REG_NO_CONFLICT to indicate that the sub-object
assignments didn't conflict. In all it was rather hackish.
Jeff