This is an archive of the discontinued LLVM Phabricator instance.

[flang][fir] Add OpaqueAttr.
ClosedPublic

Authored by schweitz on Feb 8 2021, 2:15 PM.

Diff Detail

Event Timeline

schweitz created this revision.Feb 8 2021, 2:15 PM
schweitz requested review of this revision.Feb 8 2021, 2:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 8 2021, 2:15 PM
mehdi_amini added inline comments.Feb 8 2021, 2:50 PM
flang/include/flang/Optimizer/Dialect/FIRAttr.h
139

It seems critical to me that these are documented as only appropriate for non-semantic bearing content (debug help?) to preserve round-tripping of the IR and reproducibility. The use of such attribute should be exceptional I think.

Another aspect to document very clearly is that the pointer used to create such attribute must outlive any IR that would refer to this attribute.

kiranchandramohan accepted this revision.Feb 8 2021, 3:30 PM

LGTM. Please consider Mehdi's comments before submitting.

This revision is now accepted and ready to land.Feb 8 2021, 3:30 PM
schweitz added inline comments.Feb 8 2021, 3:49 PM
flang/include/flang/Optimizer/Dialect/FIRAttr.h
139

Will do.

This revision was landed with ongoing or failed builds.Feb 8 2021, 4:02 PM
This revision was automatically updated to reflect the committed changes.