[PATCH] D136261: Introduce range based singleton searches for loop queries
Michael Kruse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 26 08:47:13 PDT 2022
Meinersbur accepted this revision.
Meinersbur added a comment.
This revision is now accepted and ready to land.
LGTM. thank you for the update.
When committing, can you add "NFC" (No Functional Change intended) to the title?
================
Comment at: llvm/include/llvm/Analysis/LoopInfoImpl.h:86-87
+ auto singleExitBlock = [&](BlockT *BB,
+ bool AllowRepeats) -> std::pair<BlockT *, bool> {
+ assert(AllowRepeats == Unique && "Unexpected parameter value.");
+ return find_singleton_nested<BlockT>(children<BlockT *>(BB), notInLoop,
----------------
I think I would have made separate versions of `find_singleton` instead of adding `AllowRepeats` so the parameter would not need to be propagated into the Predicate. However, at least in this case `AllowRepeats` is not a constant and could made it more complicated.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136261/new/
https://reviews.llvm.org/D136261
More information about the llvm-commits
mailing list