[LLVMdev] [PATCH] SelectionDAG Debug

David Greene dag at cray.com
Wed Mar 3 13:25:15 PST 2010


On Wednesday 03 March 2010 15:12:01 Dan Gohman wrote:

> > I'm not following you.  Why does a fix for a bug have anything to do
> > with a patch that catches bugs?
>
> It helps people understand what's being checked.

I can add some commentary about that.  That's a good idea, actually.  :)

> On an unrelated topic, the patch works by replacing the normal use
> list with a std::list. To be really complete, it should leave the
> normal use list in place, so that it the normal use list code
> continues to be tested in XDEBUG builds. A parallel std::list
> could be maintained for consistency checking.

Hmm, I can see value there.  It would require defining a use_iterator to
hold both an "original use_iterator" and a std::list<>::iterator and we'd
have to make all of the operations update two parallel lists.

Does that sound like the right approach to you?

                                                      -Dave




More information about the llvm-dev mailing list