[PATCH] D75098: Add TCOPY, a terminator form of the COPY instr

Bill Wendling via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 25 17:57:47 PST 2020


void marked 5 inline comments as done.
void added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp:179
+    const MachineBasicBlock::iterator Term = MBB->getFirstTerminator();
+    if (Term != MBB->end() && Term->getOpcode() == TargetOpcode::INLINEASM_BR)
+      TgtOpc = TargetOpcode::COPY_BR;
----------------
arsenm wrote:
> void wrote:
> > arsenm wrote:
> > > I would expect this to not special case INLINEASM_BR. This should be any value defined by a terminator instruction
> > Does this include unconditional jump terminators?
> I'm not sure how you could construct a sensible unconditional jump that would require a copy after it. Seems like something to check in the verifier
My comment wasn't very good. When converting something to a TCOPY, we need to figure out which terminators are candidates for having a TCOPY after them. Or perhaps better, what condition requires a TCOPY instead of a regular COPY.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75098





More information about the llvm-commits mailing list