LGTM with Mehdi's comments addressed.
Thanks for adding the folding!
Wed, Jan 20
Since MLIR is also handling tensors and vectors, I'm not entirely sure how this check would be implemented (i.e. the operands can't always be cast to FloatAttr). The function constFoldBinaryOp currently handles these cases, so we'd have to re-implement some of that logic. Does someone with more experience with the existing folders have any good ideas about this?
Tue, Jan 19
Fri, Jan 15
Out of curiosity: may I please have some context for what this base class is being created for? Ie, what consumers other than the existing PatternRewriter will soon exist? :)
Address most comments
Fix accidental incorrect behavior for casts
Thu, Jan 14
Did a pass through, and looks good to me.
Wed, Jan 13
I went with IRRewriterImpl as this seems close to a SmallVectorImpl situation, but happy to rename to something else if there are suggestions.
Tue, Jan 12
Mon, Jan 11
Sun, Jan 10
Fri, Jan 8
Resolve comments and rebase
+Chris as I think you also ran into a need for this.
Thu, Jan 7
LGTM from me, but can you send a post to llvm-dev to make sure there is general consensus?
Wed, Jan 6
Separate definition because gcc 10 doesn't allow attributes on function definition.
It's done now, but it seems to me that the C++14 attribute would have been cleaner.
LLVM uses C++14, so I'm wondering if the LLVM_ATTRIBUTE_DEPRECATED macro itself should be deprecated ;-)
LGTM after adding error messages. Thanks!