[PATCH] D98401: [CodeGen] Fix backward copy propagation with -g
Orlando Cazalet-Hyams via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 11 08:51:33 PST 2021
Orlando added subscribers: debug-info, Orlando.
Orlando added a comment.
In D98401#2618987 <https://reviews.llvm.org/D98401#2618987>, @fhahn wrote:
> please add a unit test
Hi @fhahn did you mean regression/lit test?
In D98401#2619021 <https://reviews.llvm.org/D98401#2619021>, @condy wrote:
> Sorry, it's my first patch to LLVM. Let me figure out how to add unit tests. Any tutorials will help me a lot.
>
> Thanks in advance.
This should help get you started with writing a test: https://llvm.org/docs/TestingGuide.html
================
Comment at: llvm/lib/CodeGen/MachineCopyPropagation.cpp:651-653
+ // Ignore DBG_VALUEs
+ if (MI->isDebugValue())
+ continue;
----------------
Is it worth using `MachineInstr::isMetaInstruction` instead of `MachineInstr::isDebugValue` to catch other MIR instructions which don't produce executable code too?
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