HomePhabricator

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

Authored by jmorse on Dec 10 2018, 4:04 AM.

Description

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

Currently, dbg.value's of "nullptr" are dropped when entering a SelectionDAG --
apparently just because of an oversight when recognising Values that are
constant (see PR39787). This patch adds ConstantPointerNull to the list of
constants that can be turned into DBG_VALUEs.

The matter of what bit-value a null pointer constant in LLVM has was raised
in this mailing list thread:

http://lists.llvm.org/pipermail/llvm-dev/2018-December/128234.html

Where it transpires LLVM relies on (IR) null pointers being zero valued,
thus I've baked this assumption into the patch.

Differential Revision: https://reviews.llvm.org/D55227

llvm-svn: 348753

Details

Committed
jmorseDec 10 2018, 4:04 AM
Differential Revision
D55227: [DebugInfo] Don't drop dbg.value's of nullptr
Parents
rG1bf1a156d673: [OpenCL][CodeGen] Fix replacing memcpy with addrspacecast
Branches
Unknown
Tags
Unknown