[Mlir-commits] [mlir] [mlir][spirv] Fix UpdateVCEPass to deduce the correct set of capabilities (PR #151108)
Igor Wodiany
llvmlistbot at llvm.org
Wed Jul 30 02:09:31 PDT 2025
================
@@ -95,6 +95,21 @@ static LogicalResult checkAndUpdateCapabilityRequirements(
return success();
}
+static SetVector<spirv::Capability>
+addAllImpliedCapabilities(SetVector<spirv::Capability> &caps) {
+ SetVector<spirv::Capability> allCaps;
+ while (!caps.empty()) {
----------------
IgWod-IMG wrote:
I looked at the documentation for `SetVector` and it says: "The order of iteration is the order of insertion." (https://llvm.org/doxygen/classllvm_1_1SetVector.html), so I wonder whether you could implement it with only one `SetVector`, the original one. The idea would be that you iterate over `caps`, but also `push_back` to it, then the loop should run until your reach the end of `caps` that will now also include all implied caps.
https://github.com/llvm/llvm-project/pull/151108
More information about the Mlir-commits
mailing list