[PATCH] D111042: flang-omp-report summarising script

Andrzej Warzynski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 1 05:07:25 PDT 2021


awarzynski added inline comments.


================
Comment at: flang/examples/flang-omp-report-plugin/yaml_summarizer.py:33
+
+    ``python3 yaml_summarizer.py -d ~/llvm-project/build/ --r``
+
----------------



================
Comment at: flang/examples/flang-omp-report-plugin/yaml_summarizer.py:236-237
+
+    if clean:
+        clean(result)
+
----------------
Why is this needed?


================
Comment at: flang/examples/flang-omp-report-plugin/yaml_summarizer.py:69-80
+    Example after being processed to yaml:
+        /../llvm-project/flang/test/Examples/omp-device-constructs.f90:
+        - construct: target
+          line: 18
+          clauses:
+          - clause: map
+              details: arraya
----------------
josh.mottley.arm wrote:
> awarzynski wrote:
> > Wouldn't the output with `-l` only really differ when at least 2 input files were used?
> The only difference when using 1 input file to original yaml file would be that the file path is stated only once at the top, whereas the original yaml file states the file with each construct.
It looks like `-l` will change the output in two cases:
* when only one file is read, the filename will only appear once at the top (as opposed to multiple times within the file)
* when multiple files are read, then the filename for each file is only printed once before the input for the corresponding file is dumped
Is this correct? Could you document it? Perhaps that's something that should appear in the module doc-string rather than here?

Also, I think that you could simplify this documentation by including a pseudo-example:
```
$ python3 yaml_summarizer.py -l file_1.yaml file_2.yaml
file_1.yaml
<OMP clauses and constructs from file_1.yaml>
file_2.yaml
<OMP clauses and constructs from file_2.yaml>

$ python3 yaml_summarizer.py file_1.yaml file_2.yaml
<OMP clauses and constructs from file_1.yaml and file_2.yaml>
```
Or something similar. This way, you make the behavior controlled with `-l` more obvious. Also, pasting the output for `omp-device-constructs.f90` takes a lot of space, but does not really clarify much. I would just remove it. Similar comment for `process_summary`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111042/new/

https://reviews.llvm.org/D111042



More information about the llvm-commits mailing list