[PATCH] D98401: [CodeGen] Fix backward copy propagation with -g

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 12 09:29:34 PST 2021


fhahn added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineCopyPropagation.cpp:651-653
+    // Ignore DBG_VALUEs
+    if (MI->isDebugValue())
+        continue;
----------------
condy wrote:
> Orlando wrote:
> > Is it worth using `MachineInstr::isMetaInstruction` instead of `MachineInstr::isDebugValue` to catch other MIR instructions which don't produce executable code too?
> > 
> It should be. Actually I don't know there is a function `isMetaInstruction`, thanks for pointing out.
Can this check be at the beginning of the loop? (same for the other one).

There also are iterators to skip over debug instructions (`instructionsWithoutDebug`), perhaps a version that skips meta instructions might also be helpful.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98401



More information about the llvm-commits mailing list