[PATCH] D55227: [DebugInfo] Don't drop dbg.value's of nullptr
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 3 11:57:59 PST 2018
vsk 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
----------------
getValueImpl() emits a DAG.getConstant(0) regardless of which address space is used.
================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:5305
+ if (isa<ConstantInt>(V) || isa<ConstantFP>(V) || isa<UndefValue>(V) ||
+ isa<ConstantPointerNull>(V)) {
SDV = DAG.getConstantDbgValue(Variable, Expression, V, dl, SDNodeOrder);
----------------
I'm curious what happens if V is-a Constant, but not one of these constants (e.g ConstantAggregate). It seems unlikely that V would always be in NodeMap in that case.
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