This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Arith][NFC] Migrate Arith dialect to the new fold API
ClosedPublic

Authored by zero9178 on Jan 11 2023, 5:52 AM.

Details

Summary

This is the dialect in-tree with the most fold method implementations by far. This patch simply changes all implementations to make use of the new signature.

Admittedly, the code readability does not get a lot better in this case, simply due to most methods making use of constFoldBinaryOp. I did not modify that function or its interface as part of this patch, but might be something to consider in the future.

Diff Detail

Event Timeline

zero9178 created this revision.Jan 11 2023, 5:52 AM
zero9178 requested review of this revision.Jan 11 2023, 5:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 11 2023, 5:52 AM
mehdi_amini accepted this revision.Jan 11 2023, 6:15 AM
This revision is now accepted and ready to land.Jan 11 2023, 6:15 AM