[llvm] r248010 - SelectionDAG: Introduce PersistentID to SDNode for assert builds.
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 19 13:05:07 PDT 2015
> On Sep 18, 2015, at 10:41 AM, Matthias Braun via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>
> Author: matze
> Date: Fri Sep 18 12:41:00 2015
> New Revision: 248010
>
> URL: http://llvm.org/viewvc/llvm-project?rev=248010&view=rev
> Log:
> 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]
>
I’m noticing a problem with the ID assigning. In the testcase from http://reviews.llvm.org/D12775
the EntryToken and another node end up assigned the same ID 0 which doesn’t make much sense:
Initial selection DAG: BB#0 'merge_store_partial_overlap_load:'
SelectionDAG has 20 nodes:
t0: ch = EntryToken
t0: i64 = Register %vreg0
More information about the llvm-commits
mailing list