David Greene dag at cray.com
Mon Dec 17 10:17:52 PST 2007

Attached is a patch to fix a GLIBCXX_DEBUG error in ScheduleDAGRRList.

The problem is that calls to CapturePred may reprioritize elements in the
priority queue, violating streak weak ordering requirements.

To fix this, I introduced a reference wrapper for containers to obtain access
to the SUnitVec used by std::priority_queue.   When CapturePred runs, it
calls updateNode which does a std::make_heap on the underlying SUnitVec.
This restores the correct ordering.

I believe this should also make the scheduler run more like it is supposed to.
Previously, the priority queue ordering was incorrect so we weren't necessarly
scheduling correctly.

The container_reference_wrapper part may be controversial.  So I want to
get some opinions on this before I submit it.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: ScheduleDAG.patch
Type: text/x-diff
Size: 7731 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20071217/87b1bf6b/attachment.patch>

More information about the llvm-dev mailing list