HomePhabricator

[MLIR][SPIRV] Start module combiner

Authored by ergawy on Oct 30 2020, 6:18 AM.

Description

[MLIR][SPIRV] Start module combiner

This commit adds a new library that merges/combines a number of spv
modules into a combined one. The library has a single entry point:
combine(...).

To combine a number of MLIR spv modules, we move all the module-level ops
from all the input modules into one big combined module. To that end, the
combination process can proceed in 2 phases:

(1) resolving conflicts between pairs of ops from different modules
(2) deduplicate equivalent ops/sub-ops in the merged module. (TODO)

This patch implements only the first phase.

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D90022

Event Timeline

Looks like this commit broke the CI. Apologies for that. Looking into why this happens atm.

Sorry about that! I actually ninja check-mlir before landing.. Looks like missing dependency to MLIRSPIRVModuleCombiner in the test library.