SelectionDAG: Introduce PersistentID to SDNode for assert builds.
authorMatthias Braun <matze@braunis.de>
Fri, 18 Sep 2015 17:41:00 +0000 (17:41 +0000)
committerMatthias Braun <matze@braunis.de>
Fri, 18 Sep 2015 17:41:00 +0000 (17:41 +0000)
commit6c76d11db86334752582b2d0353818f5f565eabf
tree5d78c6edd783c640f6cc4448522aeef6a3c2611f
parentf8d6e92d57aacf9388e8ed87cc43b22bd3367c4f
SelectionDAG: Introduce PersistentID to SDNode for assert builds.

This gives us more human readable numbers to identify nodes in debug
dumps.

Before:
  0x7fcbd9700160: ch = EntryToken

  0x7fcbd985c7c8: i64 = Register %RAX

   ...

      0x7fcbd9700160: <multiple use>
    0x7fcbd985c578: i64,ch = MOV64rm 0x7fcbd985c6a0, 0x7fcbd985cc68, 0x7fcbd985c200, 0x7fcbd985cd90, 0x7fcbd985ceb8, 0x7fcbd9700160<Mem:LD8[@foo]> [ORD=2]

  0x7fcbd985c8f0: ch,glue = CopyToReg 0x7fcbd9700160, 0x7fcbd985c7c8, 0x7fcbd985c578 [ORD=3]

    0x7fcbd985c7c8: <multiple use>
    0x7fcbd985c8f0: <multiple use>
    0x7fcbd985c8f0: <multiple use>
  0x7fcbd985ca18: ch = RETQ 0x7fcbd985c7c8, 0x7fcbd985c8f0, 0x7fcbd985c8f0:1 [ORD=3]

Now:
  t0: ch = EntryToken

  t5: i64 = Register %RAX

    ...

      t0: <multiple use>
    t3: i64,ch = MOV64rm t10, t12, t11, t13, t14, t0<Mem:LD8[@foo]> [ORD=2]

  t6: ch,glue = CopyToReg t0, t5, t3 [ORD=3]

    t5: <multiple use>
    t6: <multiple use>
    t6: <multiple use>
  t7: ch = RETQ t5, t6, t6:1 [ORD=3]

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248010 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/SelectionDAG.h
include/llvm/CodeGen/SelectionDAGNodes.h
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
test/CodeGen/PowerPC/ppc64-icbt-pwr7.ll
test/DebugInfo/Generic/constant-sdnodes-have-dbg-location.ll
test/DebugInfo/Generic/constantfp-sdnodes-have-dbg-location.ll