[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:23:27 PST 2024


kuhar wrote:

> I probably had similar feedback on previous *_to_vector - but I do wonder whether these are worthwhile/that much of a benefit compared to composing the two operations when needed?

I see `map_to_vector` used a lot across MLIR and downstream in IREE -- this one fewer layer of function calls is often what makes this appealing vs. using a for loop. So I'd argue that the real-world usage and improved readability justify this.

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


More information about the llvm-commits mailing list