Flang OpenMP Report Plugin
authorStuart Ellis <stuart.ellis@arm.com>
Tue, 28 Sep 2021 21:17:27 +0000 (22:17 +0100)
committerIvan Zhechev <ivan.zhechev@arm.com>
Tue, 28 Sep 2021 21:57:17 +0000 (22:57 +0100)
commit38c42d42eb3f88800c5d8e0657851551f89b2e90
tree0c491443f7eab110e9d564bdc451c394b182c38c
parentbdde959533f05d7d191cabce4d62216754802014
Flang OpenMP Report Plugin

This plugin parses Fortran files and creates a
YAML report with all the OpenMP constructs and
clauses seen in the file.

The following tests have been modified to be
compatible for testing the plugin, hence why
they are not reused from another directory:

- omp-atomic.f90
- omp-declarative-directive.f90
- omp-device-constructs.f90

The plugin outputs a single file in the same
directory as the source file in the following format:
`<source-file-name>.yaml`

Building the plugin:
`ninja flangOmpReport`

Running the plugin:
`./bin/flang-new -fc1 -load lib/flangOmpReport.so -plugin flang-omp-report -fopenmp <source_file.f90>`

Co-authored-by: Kiran Chandramohan <kiran.chandramohan@arm.com>
Co-authored-by: Stuart Ellis <stuart.ellis@arm.com>
Reviewed By: awarzynski, kiranchandramohan

Differential Revision: https://reviews.llvm.org/D109890
flang/examples/CMakeLists.txt
flang/examples/flang-omp-report-plugin/CMakeLists.txt [new file with mode: 0644]
flang/examples/flang-omp-report-plugin/flang-omp-report-visitor.cpp [new file with mode: 0644]
flang/examples/flang-omp-report-plugin/flang-omp-report-visitor.h [new file with mode: 0644]
flang/examples/flang-omp-report-plugin/flang-omp-report.cpp [new file with mode: 0644]
flang/test/Examples/omp-atomic.f90 [new file with mode: 0644]
flang/test/Examples/omp-declarative-directive.f90 [new file with mode: 0644]
flang/test/Examples/omp-device-constructs.f90 [new file with mode: 0644]