[PATCH] D135434: Propagate tied operands when copying a MachineInstr.

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 9 01:20:42 PDT 2022


dmgreen added reviewers: bcahoon, efriedma.
dmgreen added a comment.

This sounds OK to me, and is probably how I would fix this. But it will effect more than just the MachinePipeliner, anything that goes through CloneMachineInstr. Looking at where that is uses, that seems like most the uses should be OK. I'm don't think many backends will use these implicit tied uses, and copying them sounds more correct during a clone.

There are used for inline assembly though. There is a bit of code in the Pipeliner that:

  MachineInstr *NewMI = MF.CloneMachineInstr(OldMI);
  // Check for tied operands in inline asm instructions. This should be handled
  // elsewhere, but I'm not sure of the best solution.
  if (OldMI->isInlineAsm()) {
    ... tie operands together

Can this be removed now? I don't see any pipelining + inline assembly tests in the test suite. And with inline asm usually acting as a barrier it wasn't easy for me to make an example. It may be trying to tie operands together twice now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135434/new/

https://reviews.llvm.org/D135434



More information about the llvm-commits mailing list