Skip to content

Commit 5c88f00

Browse files
committedJul 19, 2017
[Polly][docs][Release Notes] Adding Information about Remarks to Release Notes and Documentation
Summary: Based off of D35399 Reviewers: pollydev, llvm-commits, bollu, grosser Reviewed By: grosser Tags: #polly Contributed-by: Tarun Ranjendran Differential Revision: https://reviews.llvm.org/D35596 llvm-svn: 308403
1 parent 5518d18 commit 5c88f00

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed
 

‎polly/docs/ReleaseNotes.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,12 @@ Before::
7979

8080
return false;
8181
}
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.

‎polly/docs/UsingPollyWithClang.rst

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,24 @@ The flags -polly-import and -polly-export allow the export and reimport of the
109109
polyhedral representation. By exporting, modifying and reimporting the
110110
polyhedral representation externally calculated transformations can be
111111
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.

0 commit comments

Comments
 (0)
Please sign in to comment.