This is an archive of the discontinued LLVM Phabricator instance.

[Flang][Sema] Move directive sets to a shared location
ClosedPublic

Authored by skatrak on Aug 4 2023, 5:54 AM.

Details

Summary

This patch moves directive sets defined internally in Semantics to a header accessible by other stages of the compiler to enable reuse. Some sets are renamed/rearranged and others are lifted from local definitions to provide a single source of truth.

Diff Detail

Event Timeline

skatrak created this revision.Aug 4 2023, 5:54 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
skatrak requested review of this revision.Aug 4 2023, 5:54 AM
skatrak updated this revision to Diff 547181.Aug 4 2023, 5:57 AM

Add missing newline at end of file.

This looks OK. The only concern is whether we will lose the ability to inline the code for set membership. Can these sets be put in a header file with inline constexpr?

skatrak updated this revision to Diff 547686.Aug 7 2023, 3:00 AM

Declare sets as inline inside of header file.

This looks OK. The only concern is whether we will lose the ability to inline the code for set membership. Can these sets be put in a header file with inline constexpr?

Thank you for the suggestion. It's not possible to declare these as constexpr because EnumSet::set, called by the constructor, is not constexpr as well. But I have made them const inline and defined them in the header file. I hope that addresses your concerns.

kiranchandramohan accepted this revision.Aug 7 2023, 3:15 AM

Thanks. LG.

This revision is now accepted and ready to land.Aug 7 2023, 3:15 AM
This revision was landed with ongoing or failed builds.Aug 7 2023, 3:19 AM
This revision was automatically updated to reflect the committed changes.