[PATCH] D40084: Assert correct removal of SUnit in LatencyPriorityQueue
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 16 02:18:14 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL318387: Assert correct removal of SUnit in LatencyPriorityQueue (authored by d0k).
Changed prior to commit:
https://reviews.llvm.org/D40084?vs=123021&id=123141#toc
Repository:
rL LLVM
https://reviews.llvm.org/D40084
Files:
llvm/trunk/lib/CodeGen/LatencyPriorityQueue.cpp
Index: llvm/trunk/lib/CodeGen/LatencyPriorityQueue.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/LatencyPriorityQueue.cpp
+++ llvm/trunk/lib/CodeGen/LatencyPriorityQueue.cpp
@@ -134,6 +134,7 @@
void LatencyPriorityQueue::remove(SUnit *SU) {
assert(!Queue.empty() && "Queue is empty!");
std::vector<SUnit *>::iterator I = find(Queue, SU);
+ assert(I != Queue.end() && "Queue doesn't contain the SU being removed!");
if (I != std::prev(Queue.end()))
std::swap(*I, Queue.back());
Queue.pop_back();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40084.123141.patch
Type: text/x-patch
Size: 567 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171116/5c1ed548/attachment.bin>
More information about the llvm-commits
mailing list