Allow overriding visitOperation in AbstractSparseDataFlowAnalysis

Hi,
Similar to this commit, which makes AbstractDenseForwardDataFlowAnalysis::visitOperation overrideable, I would like to make AbstractSparseForwardDataFlowAnalysis::visitOperation overrideable as well.

My use-case necessitates looking at operations with no results because my dialect has operations where results are passed in as an another operand. The current visitOperation implementation by-default ignores operations with no results.

Additionally, I noticed that I also need to run my analysis with the dead-code analysis or by default regions will be marked dead and then ignored.

I’m having to copy over a bunch of code and extend DataFlowAnalysis directly just so I can override the visitOperation function because of the above 2 requirements.

Are there any objections to this change?

I don’t quite understand how it works: in general (without more detail) that seems like no longer a sparse SSA dataflow anymore?

It’s still sparse - the analysis doesn’t care for every op only certain values.

To give you one example, we have these memory copying ops such as copy memA to memB where both memA and memB are memrefs and I want to propagate some information associated to memA to memB.