[llvm] [NFC][MC][DecoderEmitter] Simplify loop to find the best filter (PR #156237)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 31 04:32:41 PDT 2025
================
@@ -1473,26 +1473,21 @@ FilterChooser::findBestFilter(ArrayRef<bitAttr_t> BitAttrs, bool AllowMixed,
// We have finished with the filter processings. Now it's time to choose
// the best performing filter.
- unsigned BestIndex = 0;
- bool AllUseless = true;
+ std::unique_ptr<Filter> *BestFilter = nullptr;
----------------
s-barannikov wrote:
Pointer to pointer is a bit confusing. Can this be an iterator?
Or maybe replace the loop with max_element?
https://github.com/llvm/llvm-project/pull/156237
More information about the llvm-commits
mailing list