[PATCH] D138757: [zero-call-used-regs] Mark only non-debug instruction's register as used
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 23 15:05:14 PST 2023
MatzeB added inline comments.
================
Comment at: llvm/lib/CodeGen/PrologEpilogInserter.cpp:1234-1236
+ // skip debug instructions
+ if (MI.isDebugInstr())
+ continue;
----------------
MatzeB wrote:
> Can you just use `MO.readsReg()` instead of `MO.isUse()` below (that will also skip other cases like `undef` that aren't really reading the register).
Hmm I thought `MO.readsReg()` would check for `MO.isDebug()` but apparently it does not. So this check here is fine, sorry for the confusion.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138757/new/
https://reviews.llvm.org/D138757
More information about the llvm-commits
mailing list