[llvm] [ADT] Add convenience function `filter_to_vector` (PR #117460)

Jakub Kuderski via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 25 09:25:55 PST 2024


kuhar wrote:

My guess is that the reason for that in MLIR specifically is that we have multiple functions/methods that return ranges of IR constructs, e.g., `block.getOps<OpT>()`, which are difficult to work with until you materialize them. And materializing as a vector is usually the right thing to do as you typically end up passing these to function that take arguments as ArrayRef-like types.

https://github.com/llvm/llvm-project/pull/117460


More information about the llvm-commits mailing list