[PATCH] D83335: [ScheduleDAGRRList] Use std::*_heap() to keep candidate queue a heap.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 8 14:22:49 PDT 2020


efriedma added a comment.

> Are you referring to using the heap only once the queue grows larger than a threshold or deciding what scheduling heuristics to enable based on the size?

The scheduling heuristics.

> The selection should be deterministic across different compilers/C++ STLs because the comparator enforces a total order.

It's undefined behavior to call std::push_heap/std::pop_heap on an array that isn't a heap.  If the total order changes, that can break the heap property.  Not sure what the practical consequence would be on common STL implementations, but that seems scary enough that we want to ensure that can't happen.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83335/new/

https://reviews.llvm.org/D83335





More information about the llvm-commits mailing list