[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)
commit6eb9a62fe04a6e17a70b2c6dfc03b6966019a03c
tree0cd5653c37b76921bc0d39952746744879ba7a21
parent1336daad86de3d09d8a2319be3b12f91d4632563
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237237 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/SelectionDAG.h
include/llvm/CodeGen/SelectionDAGNodes.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
test/DebugInfo/AArch64/constant-dbgloc.ll
test/DebugInfo/ARM/constant-dbgloc.ll
test/DebugInfo/ARM/multiple-constant-uses-drops-dbgloc.ll [new file with mode: 0644]
test/DebugInfo/ARM/single-constant-use-preserves-dbgloc.ll [new file with mode: 0644]
test/DebugInfo/constant-sdnodes-have-dbg-location.ll
test/DebugInfo/constantfp-sdnodes-have-dbg-location.ll [new file with mode: 0644]