Page MenuHomePhabricator

[OpenMP][NFC] Move and simplify directive -> allowed clause mapping
ClosedPublic

Authored by jdoerfert on Mar 30 2020, 7:35 PM.

Details

Summary

Move the listing of allowed clauses per OpenMP directive to the new
macro file in llvm/Frontend/OpenMP. Also, use a single generic macro
that specifies the directive and one allowed clause explicitly instead
of a dedicated macro per directive.

We save 800 loc and boilerplate for all new directives/clauses with no
functional change. We also need to include the macro file only once and
not once per directive.

Depends on D77112.

Diff Detail

Event Timeline

jdoerfert created this revision.Mar 30 2020, 7:35 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 30 2020, 7:35 PM

Thanks for working on this as well.
As an aside, I like the new allowed clause implementation much better. it is much simpler and cleaner than the previous one.
I'll wait to see if anyone else has comments, but if not, then it LGTM.

JonChesterfield accepted this revision.Mar 31 2020, 3:11 PM

LGTM too. Non functional change, clearer code. Thanks

This revision is now accepted and ready to land.Mar 31 2020, 3:11 PM
This revision was automatically updated to reflect the committed changes.