This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][SPIRV] ModuleCombiner: deduplicate identical functions.
AbandonedPublic

Authored by ergawy on Nov 6 2020, 5:36 AM.

Details

Summary

This commit extends the functionality of the SPIR-V module combiner
library by adding new deduplication capabilities. In particular,
implementation of deduplication of functions that are identical to each
other.

Diff Detail

Event Timeline

ergawy created this revision.Nov 6 2020, 5:36 AM
ergawy requested review of this revision.Nov 6 2020, 5:36 AM
ergawy added inline comments.Nov 6 2020, 5:43 AM
mlir/lib/Dialect/SPIRV/Linking/ModuleCombiner/ModuleCombiner.cpp
159

This is a partial copy of BlockEquivalenceData from here: https://github.com/llvm/llvm-project/blob/474f7639e3494d9605f4444b087f48e710fbb0d4/mlir/lib/Transforms/Utils/RegionUtils.cpp#L374. I only copied the bare minimum needed for what I want to do in this patch.

However, it would be great if the original (not this stolen adaptation :) ) BlockEquivalenceData be put in some util header file accessible outside RegionUtils.cpp.

ergawy abandoned this revision.Nov 6 2020, 8:32 AM

Abandoned in favor of: https://reviews.llvm.org/D90951