[PATCH] D98401: [CodeGen] Fix backward copy propagation with -g
Eric Christopher via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 15 13:46:26 PDT 2021
echristo added inline comments.
================
Comment at: llvm/lib/CodeGen/MachineCopyPropagation.cpp:651-653
+ // Ignore DBG_VALUEs
+ if (MI->isDebugValue())
+ continue;
----------------
fhahn wrote:
> 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.
This is what I was getting at, yes.
Also, style nit: comments are complete sentences, etc.
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