[llvm] [llvm] Use llvm::append_range (NFC) (PR #136066)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 17 12:44:42 PDT 2025
================
@@ -1159,8 +1159,7 @@ void BlockFrequencyInfoImpl<BT>::setBlockFreq(const BlockT *BB,
template <class BT> void BlockFrequencyInfoImpl<BT>::initializeRPOT() {
const BlockT *Entry = &F->front();
- RPOT.reserve(F->size());
- std::copy(po_begin(Entry), po_end(Entry), std::back_inserter(RPOT));
+ llvm::append_range(RPOT, post_order(Entry));
----------------
nikic wrote:
That wouldn't help here anyway, because the post order iterator does not have a known length.
https://github.com/llvm/llvm-project/pull/136066
More information about the llvm-commits
mailing list