Mehdi noted in https://reviews.llvm.org/D144391 that given the low cost of keeping the old fold method signature working and the difficulty of writing a FoldAdaptor oneself, it'd be nice to keep the support for the sake of Ops written manually in C++.
This patch therefore partially reverts the removal of the old fold method by still allowing the old signature to be used. The active use of it is still discouraged and ODS will always generate the new method using FoldAdaptors.
I'd also like to note that the previous ought to have broken some manually defined fold methods in-tree that are defined here: https://github.com/llvm/llvm-project/blob/23bcd6b86271f1c219a69183a5d90654faca64b8/mlir/include/mlir/Dialect/Affine/IR/AffineOps.h#L245 It seems like these are not part of the regressions tests however...
(also feel free to discuss whether this should be done or not in this review, I don't mind either way)
Before we do that, what would it take to write a FoldAdaptor here? Maybe my concern is misplaced if this isn't a lot of boilerplate.