Skip to content

Commit f696508

Browse files
committed
[BFI] Revert use of append_range (NFC)
This is a partial revert of #136066, which introduced a compile-time regression. SmallVector::insert() computes the PostOrderIterator twice in order to call reserve().
1 parent 4c17a5c commit f696508

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1160,7 +1160,7 @@ void BlockFrequencyInfoImpl<BT>::setBlockFreq(const BlockT *BB,
11601160
template <class BT> void BlockFrequencyInfoImpl<BT>::initializeRPOT() {
11611161
const BlockT *Entry = &F->front();
11621162
RPOT.reserve(F->size());
1163-
llvm::append_range(RPOT, post_order(Entry));
1163+
std::copy(po_begin(Entry), po_end(Entry), std::back_inserter(RPOT));
11641164
std::reverse(RPOT.begin(), RPOT.end());
11651165

11661166
assert(RPOT.size() - 1 <= BlockNode::getMaxIndex() &&

0 commit comments

Comments
 (0)