This is an archive of the discontinued LLVM Phabricator instance.

[flang][NFC] Unify OpenMP and OpenACC structure checker
ClosedPublic

Authored by clementval on Aug 2 2020, 6:48 PM.

Details

Summary

This patch remove duplicated code between the check-omp-structure and the check-acc-structure
and unify it into a check-directive-structure templated class.

Diff Detail

Event Timeline

clementval created this revision.Aug 2 2020, 6:48 PM
clementval requested review of this revision.Aug 2 2020, 6:48 PM
kiranchandramohan accepted this revision.Aug 4 2020, 1:18 PM

LGTM. Please wait for one more approval.

This revision is now accepted and ready to land.Aug 4 2020, 1:18 PM
clementval updated this revision to Diff 283107.Aug 4 2020, 7:11 PM

Fix directive1 and directive2 tests

LGTM. Please wait for one more approval.

Thanks for the review. I noticed that the lit tests were failing. Just updated the patch to fix them.

clementval added a project: Restricted Project.

@ichoyjx can you have a look?

sscalpone accepted this revision.Aug 5 2020, 8:17 AM
ichoyjx accepted this revision.Aug 5 2020, 10:50 AM
ichoyjx added inline comments.
flang/lib/Semantics/check-directive-structure.h
31

Quick question, PC stands for?

flang/lib/Semantics/check-omp-structure.cpp
43

Adding CheckMatching into all the Enter functions is a good move.

clementval marked 2 inline comments as done.Aug 5 2020, 11:13 AM

Thanks for the reviews. Will try to push that today.

flang/lib/Semantics/check-directive-structure.h
31

ParserClass ... was trying to have short typename to not clutter the code too much. I'll add a comment on the class definition to mention what is what.

This revision was landed with ongoing or failed builds.Aug 5 2020, 11:26 AM
This revision was automatically updated to reflect the committed changes.
clementval marked an inline comment as done.