File tree 2 files changed +30
-1
lines changed 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -79,3 +79,12 @@ Before::
79
79
80
80
return false;
81
81
}
82
+
83
+ --------------------------
84
+ Improved Polly Diagnostics
85
+ --------------------------
86
+
87
+ Polly now uses the LLVM OptimizationDiagnosticInfo API for emitting diagnostic remarks.
88
+ This allows Polly remarks to appear in the yaml optimization record when compiling
89
+ with the flag -fsave-optimization-record. This also allow Polly remarks to appear in the opt-viewer
90
+ tool, allowing for remarks to be viewed next to the source code, and sorted by hotness.
Original file line number Diff line number Diff line change @@ -109,4 +109,24 @@ The flags -polly-import and -polly-export allow the export and reimport of the
109
109
polyhedral representation. By exporting, modifying and reimporting the
110
110
polyhedral representation externally calculated transformations can be
111
111
applied. This enables external optimizers or the manual optimization of
112
- specific SCoPs.
112
+ specific SCoPs.
113
+
114
+ Viewing Polly Diagnostics with opt-viewer
115
+ -----------------------------------------
116
+
117
+ The flag -fsave-optimization-record will generate .opt.yaml files when compiling
118
+ your program. These yaml files contain information about each emitted remark.
119
+ Ensure that you have Python 2.7 with PyYaml and Pygments Python Packages.
120
+ To run opt-viewer:
121
+
122
+ .. code-block :: console
123
+
124
+ llvm/tools/opt-viewer/opt-viewer.py -source-dir /path/to/program/src/ \
125
+ /path/to/program/src/foo.opt.yaml \
126
+ /path/to/program/src/bar.opt.yaml \
127
+ -o ./output
128
+
129
+ Include all yaml files (use *.opt.yaml when specifying which yaml files to view)
130
+ to view all diagnostics from your program in opt-viewer. Compile with `PGO
131
+ <https://clang.llvm.org/docs/UsersManual.html#profiling-with-instrumentation>` to view
132
+ Hotness information in opt-viewer. Resulting html files can be viewed in an internet browser.
You can’t perform that action at this time.
0 commit comments