This is an archive of the discontinued LLVM Phabricator instance.

[mlir][LLVMIR] Update LLVMIR fastmath to use EnumAttr tblgen classes
ClosedPublic

Authored by jfurtek on Oct 5 2022, 10:43 AM.

Details

Summary

This diff updates the fastmath attribute in the LLVMIR dialect to use tblgen
classes that were developed after the initial LLVMIR fastmath implementation.
Using the EnumAttr tblgen classes brings the LLVMIR fastmath attribute in
line with other dialects, and eliminates some of the custom printing and parsing
code in the LLVMIR dialect.

Subsequent commits will further reduce the custom processing code for the LLVMIR
fastmath attribute by unifying printing/parsing functionality between the
LLVMIR and arith fastmath attributes. (The actual attributes will remain
separate, but the printing and parsing will be made generic, and will be usable
by other dialects/attributes.)

Diff Detail

Event Timeline

jfurtek created this revision.Oct 5 2022, 10:43 AM
Herald added a project: Restricted Project. · View Herald Transcript
jfurtek requested review of this revision.Oct 5 2022, 10:43 AM
ftynse accepted this revision.Oct 6 2022, 1:02 AM
This revision is now accepted and ready to land.Oct 6 2022, 1:02 AM