summaryrefslogtreecommitdiff
path: root/polly/docs
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2017-07-19 01:16:55 +0000
committerTobias Grosser <tobias@grosser.es>2017-07-19 01:16:55 +0000
commit5c88f007651f433e5192c6a4b5ec6aaa08c75f1c (patch)
tree0cbf7dbf14da3d438dd682aa3a88962bd78e146f /polly/docs
parent5518d189ee8c87f3cf24dd09b944eb286fd5c202 (diff)
downloadllvm-5c88f007651f433e5192c6a4b5ec6aaa08c75f1c.tar.gz
[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
Diffstat (limited to 'polly/docs')
-rw-r--r--polly/docs/ReleaseNotes.rst9
-rw-r--r--polly/docs/UsingPollyWithClang.rst22
2 files changed, 30 insertions, 1 deletions
diff --git a/polly/docs/ReleaseNotes.rst b/polly/docs/ReleaseNotes.rst
index b62aae02fbdc..b778d0b4d560 100644
--- a/polly/docs/ReleaseNotes.rst
+++ b/polly/docs/ReleaseNotes.rst
@@ -79,3 +79,12 @@ Before::
return false;
}
+
+--------------------------
+Improved Polly Diagnostics
+--------------------------
+
+Polly now uses the LLVM OptimizationDiagnosticInfo API for emitting diagnostic remarks.
+This allows Polly remarks to appear in the yaml optimization record when compiling
+with the flag -fsave-optimization-record. This also allow Polly remarks to appear in the opt-viewer
+tool, allowing for remarks to be viewed next to the source code, and sorted by hotness.
diff --git a/polly/docs/UsingPollyWithClang.rst b/polly/docs/UsingPollyWithClang.rst
index 410834990715..1beb0fc2ec34 100644
--- a/polly/docs/UsingPollyWithClang.rst
+++ b/polly/docs/UsingPollyWithClang.rst
@@ -109,4 +109,24 @@ The flags -polly-import and -polly-export allow the export and reimport of the
polyhedral representation. By exporting, modifying and reimporting the
polyhedral representation externally calculated transformations can be
applied. This enables external optimizers or the manual optimization of
-specific SCoPs.
+specific SCoPs.
+
+Viewing Polly Diagnostics with opt-viewer
+-----------------------------------------
+
+The flag -fsave-optimization-record will generate .opt.yaml files when compiling
+your program. These yaml files contain information about each emitted remark.
+Ensure that you have Python 2.7 with PyYaml and Pygments Python Packages.
+To run opt-viewer:
+
+.. code-block:: console
+
+ llvm/tools/opt-viewer/opt-viewer.py -source-dir /path/to/program/src/ \
+ /path/to/program/src/foo.opt.yaml \
+ /path/to/program/src/bar.opt.yaml \
+ -o ./output
+
+Include all yaml files (use *.opt.yaml when specifying which yaml files to view)
+to view all diagnostics from your program in opt-viewer. Compile with `PGO
+<https://clang.llvm.org/docs/UsersManual.html#profiling-with-instrumentation>` to view
+Hotness information in opt-viewer. Resulting html files can be viewed in an internet browser.