[PATCH] D100845: [Debugify][Original DI] Test preservation of original debug var intrinsics in optimizations

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 17 08:54:14 PDT 2021


djtodoro added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/Debugify.cpp:331
+          // Skip undef values.
+          auto *Op = DVI->getVariableLocationOp(0);
+          if (isa_and_nonnull<UndefValue>(Op))
----------------
StephenTozer wrote:
> As of the current main, there is an `isUndef` function in DbgVariableIntrinsic that can be used for this check - though I've just noticed that it doesn't account for null operands, which is also something that should be handled in principle (since they aren't explicitly disallowed, and may be produced in a few places).
OK, thanks -- I think the null op should be handled as well.


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

https://reviews.llvm.org/D100845



More information about the llvm-commits mailing list