New mode option that allows for either running the default fusion kind that happens today or doing either of producer-consumer or sibling fusion. This will also be helpful to minimize the compile-time of the fusion tests.
Thanks for adding this. Please use enum valued cl option to support this.
Missing documentation for new arg.
Nit: space after comma.
Please avoid using hard coded values like 0, 1, ... as pass options. It's not readable when used in run commands, textual pass pipelines, etc. Please instead use enum valued command-line options. See test-legalize-mode for reference..
Producer- -> producer->
All functions are supposed to have doc comments.
Why is this a bool? Don't you have three modes? If this is a bug, the testing isn't adequate.
How has unsigned become a bool here?!
Triple /// comments.
Use enum valued command line options. Eg:
mlir-opt -h | grep test-legalize-mode -A 3 --test-legalize-mode=<value> - The legalization mode to use with the test driver =analysis - Perform an analysis conversion =full - Perform a full conversion =partial - Perform a partial conversion
Thanks, Sumesh! A couple of comments...
Probably good to rename this now to something more meaningful.
IIRC, maxSrcUserCount = 1 was used with the purpose of enabling some sibling fusion scenarios. I think this should be std::numeric_limits<unsigned>::max() instead?
Not immediately clear how the "greedy" aspect is different from the other two. Rephrase to:
Nit: leave a space after commas.
You don't need to repeat affine-fusion again for the option: just -affine-loop-fusion="mode=producer" should be good enough I think.
Nit: Use a hyphen: SIBLING-MAXIMAL-...