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.
Depends on D141027
Can this be done after the fact with a second call that will be properly documented as injecting user-specified information in the IR while bypassing a complex analysis ?
tileAndFuseProducerOfSlice is complex enough as it is and yieldFusedProducerReplacement is deceptively simple to trigger and break semantics.
A separate function that would apply after the transformation with a proper name and warning that this is an "assume-like" transform, seems highly desirable.