[Mlir-commits] [mlir] Reland "[mlir][spirv] Fix UpdateVCEPass to deduce the correct set of capabilities" (PR #151502)

Davide Grohmann llvmlistbot at llvm.org
Fri Aug 1 04:17:33 PDT 2025


================
@@ -95,6 +95,21 @@ static LogicalResult checkAndUpdateCapabilityRequirements(
   return success();
 }
 
+static SetVector<spirv::Capability>
+addAllImpliedCapabilities(SetVector<spirv::Capability> &caps) {
----------------
davidegrohmann wrote:

caps is basically a stack that is used to remove and add "processed capabilities"

For example if you have A in caps and you have this chain A->B->C:
1. caps contains A
2. A is removed from caps and added to allCaps
3. then B is added to caps due to A->B
4. caps contains B
5. B is removed from caps and added to allCaps
6. then C is added to caps due to B->C
7. caps contains C
8. C is removed from caps and added to allCaps
9. C has no implied capabilities nothing is added to caps
10. caps is empty and you return allCaps = {A, B ,C}

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


More information about the Mlir-commits mailing list