[LLVMdev] [PATCH] Debug SelectionDAG & SDUse

David Greene dag at cray.com
Thu Feb 25 14:46:05 PST 2010


I need a review of this patch and if it looks sane, someone to apply it to 
their local sources and run tests in Debug+Checks mode.

The patch replaces the intrusive SDUse list with a std::list<> when XDEBUG is 
active.  I believe I've maintained the semantics of the SDUse list but I need 
a double-check.

The patch exposes all kinds of problems in Debug+Checks mode.  Right
now most of them appear to be caused by either garbled data or assigning
an SDUse to multiple SDNode use lists.  I don't know what the root cause of
the asserts is right now.

In our copy of 2.5, we get asserts about referencing singular iterators in
ReplaceAllUsesWith.  The problem appears to be the recursive call deleting
SDUses out from under the iterators.  I have not got that far on trunk due to 
the other assert failures.

Three things that I'd like to request:

1. Someone to review that I've correctly made the data structure change.

2. Someone to apply the patch to their local tree and run a Debug+Checks test.

3. Someone to review the patch for commit.  I think having XDEBUG-style checks
    on SelectionDAG is extremely valuable.  I've been working this bug for two
    weeks and only nailed it down with this patch.

                                               -Dave

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sdxdebug.patch
Type: text/x-patch
Size: 7706 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100225/630d18b2/attachment.bin>


More information about the llvm-dev mailing list