[PATCH] D139335: [BOLT] Fix blocks layout reverse iterators
Vladislav Khmelevsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 5 08:42:11 PST 2022
yota9 created this revision.
yota9 added reviewers: maksfb, rafauler, Amir.
Herald added subscribers: treapster, ayermolo.
Herald added a project: All.
yota9 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Use container's reverse iterators
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D139335
Files:
bolt/include/bolt/Core/FunctionLayout.h
Index: bolt/include/bolt/Core/FunctionLayout.h
===================================================================
--- bolt/include/bolt/Core/FunctionLayout.h
+++ bolt/include/bolt/Core/FunctionLayout.h
@@ -303,16 +303,16 @@
return {block_begin(), block_end()};
}
block_reverse_iterator block_rbegin() {
- return block_reverse_iterator(block_end());
+ return block_reverse_iterator(Blocks.rbegin());
}
block_const_reverse_iterator block_rbegin() const {
- return block_const_reverse_iterator(block_end());
+ return block_const_reverse_iterator(Blocks.rbegin());
}
block_reverse_iterator block_rend() {
- return block_reverse_iterator(block_begin());
+ return block_reverse_iterator(Blocks.rend());
}
block_const_reverse_iterator block_rend() const {
- return block_const_reverse_iterator(block_begin());
+ return block_const_reverse_iterator(Blocks.rend());
}
iterator_range<block_const_reverse_iterator> rblocks() const {
return {block_rbegin(), block_rend()};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139335.480124.patch
Type: text/x-patch
Size: 1026 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221205/2357566c/attachment.bin>
More information about the llvm-commits
mailing list