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

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 7 04:28:02 PST 2018


jmorse marked 4 inline comments as done.
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
----------------
jmorse wrote:
> 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.
The opinion on the mailing list appears to be that all address spaces have zero-bit-valued null constants, so I've now removed the address space filter.


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

https://reviews.llvm.org/D55227





More information about the llvm-commits mailing list