[PATCH] D55227: [DebugInfo] Don't drop dbg.value's of nullptr

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 4 01:58:30 PST 2018


jmorse added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/InstrEmitter.cpp:739
+    } else if (isa<ConstantPointerNull>(V) &&
+               V->getType()->getPointerAddressSpace() == 0) {
+      // For now, assume null pointers are zero-valued
----------------
vsk wrote:
> getValueImpl() emits a DAG.getConstant(0) regardless of which address space is used.
Yeah, I've been (perhaps overly) cautious here -- getValueImpl _has_ to pick a value, but DebugInfo can emit unknown/undef. I'll stick this in the llvm-dev email too.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D55227





More information about the llvm-commits mailing list