[polly] r308403 - [Polly][docs][Release Notes] Adding Information about Remarks to Release Notes and Documentation

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 18 18:16:56 PDT 2017


Author: grosser
Date: Tue Jul 18 18:16:55 2017
New Revision: 308403

URL: http://llvm.org/viewvc/llvm-project?rev=308403&view=rev
Log:
[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

Modified:
    polly/trunk/docs/ReleaseNotes.rst
    polly/trunk/docs/UsingPollyWithClang.rst

Modified: polly/trunk/docs/ReleaseNotes.rst
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/docs/ReleaseNotes.rst?rev=308403&r1=308402&r2=308403&view=diff
==============================================================================
--- polly/trunk/docs/ReleaseNotes.rst (original)
+++ polly/trunk/docs/ReleaseNotes.rst Tue Jul 18 18:16:55 2017
@@ -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.

Modified: polly/trunk/docs/UsingPollyWithClang.rst
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/docs/UsingPollyWithClang.rst?rev=308403&r1=308402&r2=308403&view=diff
==============================================================================
--- polly/trunk/docs/UsingPollyWithClang.rst (original)
+++ polly/trunk/docs/UsingPollyWithClang.rst Tue Jul 18 18:16:55 2017
@@ -109,4 +109,24 @@ The flags -polly-import and -polly-expor
 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.




More information about the llvm-commits mailing list