[PATCH] D105280: [2/2][RemoveRedundantDebugValues] Introduce a MIR pass that removes redundant DBG_VALUEs
Stephen Tozer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 7 07:11:56 PDT 2021
StephenTozer added inline comments.
================
Comment at: llvm/lib/CodeGen/RemoveRedundantDebugValues.cpp:91
+ for (auto &MI : MBB) {
+ if (MI.isDebugValue()) {
+ MachineOperand &Loc = MI.getDebugOperand(0);
----------------
In order to make this compatible with `DBG_VALUE_LIST`, it would probably be best to add a check: if `MI.isListDebugValue()`, then terminate any existing `VariableMap` entry for `Var`. This should ensure that we don't incorrectly attempt to handle `DBG_VALUE_LIST`s by considering only their first debug operand, or ignore them entirely and potentially incorrectly remove identical `DBG_VALUE`s that have a `DBG_VALUE_LIST` for the same variable between them.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105280/new/
https://reviews.llvm.org/D105280
More information about the llvm-commits
mailing list