mirror of
https://github.com/intel/llvm.git
synced 2026-01-17 06:40:01 +08:00
This patch adds an option to the method that fuses a producer with a tiled consumer, to also yield from the tiled loops a value that can be used to replace the original producer. This is only valid if it can be assertained that the slice of the producer computed within each iteration of the tiled loop nest does not compute slices of the producer redundantly. The analysis to derive this is very involved. So this is left to the caller to assertain. A test is added that mimics the `scf::tileConsumerAndFuseProducersGreedilyUsingSCFForOp`, but also yields the values of all fused producers. This can be used as a reference for how a caller could use this functionality. Differential Revision: https://reviews.llvm.org/D141028