[DebugInfo] Debug locations for constant SD nodes
authorSergey Dmitrouk <sdmitrouk@accesssoftek.com>
Wed, 13 May 2015 08:58:03 +0000 (08:58 +0000)
committerSergey Dmitrouk <sdmitrouk@accesssoftek.com>
Wed, 13 May 2015 08:58:03 +0000 (08:58 +0000)
commit46c4f028484328af676f8413a7ae10b9919da547
tree90177179b9e67c965258610405424670cb681334
parent0ad2814c89b3a1033079dc3848e252955897abd6
[DebugInfo] Debug locations for constant SD nodes

Several updates for [DebugInfo] Add debug locations to constant SD nodes (r235989).
Includes:

 *  re-enabling the change (disabled recently);
 *  missing change for FP constants;
 *  resetting debug location of constant node if it's used more than at one place
    to prevent emission of wrong locations in case of coalesced constants;
 *  a couple of additional tests.

Now all look ups in CSEMap are wrapped by additional method.

Comment in D9084 suggests that debug locations aren't useful for "target constants",
so there might be one more change related to this API (namely, dropping debug
locations for getTarget*Constant methods).

Differential Revision: http://reviews.llvm.org/D9604

llvm-svn: 237237
llvm/include/llvm/CodeGen/SelectionDAG.h
llvm/include/llvm/CodeGen/SelectionDAGNodes.h
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/test/DebugInfo/AArch64/constant-dbgloc.ll
llvm/test/DebugInfo/ARM/constant-dbgloc.ll
llvm/test/DebugInfo/ARM/multiple-constant-uses-drops-dbgloc.ll [new file with mode: 0644]
llvm/test/DebugInfo/ARM/single-constant-use-preserves-dbgloc.ll [new file with mode: 0644]
llvm/test/DebugInfo/constant-sdnodes-have-dbg-location.ll
llvm/test/DebugInfo/constantfp-sdnodes-have-dbg-location.ll [new file with mode: 0644]