[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp

Evan Cheng evan.cheng at apple.com
Tue May 30 11:04:46 PDT 2006



Changes in directory llvm/lib/CodeGen/SelectionDAG:

ScheduleDAGList.cpp updated: 1.59 -> 1.60
---
Log message:

When a priority_queue is empty, the behavior of top() operator is
non-deterministic. Returns NULL when it's empty!


---
Diffs of the changes:  (+1 -0)

 ScheduleDAGList.cpp |    1 +
 1 files changed, 1 insertion(+)


Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp:1.59 llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp:1.60
--- llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp:1.59	Fri May 12 01:33:48 2006
+++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAGList.cpp	Tue May 30 13:04:34 2006
@@ -356,6 +356,7 @@
     }
     
     SUnit *pop() {
+      if (empty()) return NULL;
       SUnit *V = Queue.top();
       Queue.pop();
       return V;






More information about the llvm-commits mailing list