summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Davis <nullptr@fb.com>2019-06-10 20:38:56 +0000
committerMatt Davis <nullptr@fb.com>2019-06-10 20:38:56 +0000
commit41bf444e612949d72df12f343648bca989d328a6 (patch)
tree83c2fb30949cd4b71a18f7f4f1f87ad215313286
parentc920c373612b097bf10bd4af1c8ddbf681d2b513 (diff)
downloadbcm5719-llvm-41bf444e612949d72df12f343648bca989d328a6.tar.gz
bcm5719-llvm-41bf444e612949d72df12f343648bca989d328a6.zip
[Docs] [llvm-mca] Point out a caveat for using llvm-mca markers in source code.
Summary: See: https://bugs.llvm.org/show_bug.cgi?id=42173 Reviewers: andreadb, mattd, RKSimon, spatel Reviewed By: andreadb Subscribers: tschuett, gbedwell, llvm-commits, andreadb Tags: #llvm Patch by Max Marrone (maxpm)! Thanks! Differential Revision: https://reviews.llvm.org/D63040 llvm-svn: 362979
-rw-r--r--llvm/docs/CommandGuide/llvm-mca.rst13
1 files changed, 11 insertions, 2 deletions
diff --git a/llvm/docs/CommandGuide/llvm-mca.rst b/llvm/docs/CommandGuide/llvm-mca.rst
index 5b30a8a532a..d8c3b57207c 100644
--- a/llvm/docs/CommandGuide/llvm-mca.rst
+++ b/llvm/docs/CommandGuide/llvm-mca.rst
@@ -241,8 +241,8 @@ Example of overlapping regions:
Note that multiple anonymous regions cannot overlap. Also, overlapping regions
cannot have the same name.
-Inline assembly directives may be used from source code to annotate the
-assembly text:
+There is no support for marking regions from high-level source code, like C or
+C++. As a workaround, inline assembly directives may be used:
.. code-block:: c++
@@ -254,6 +254,15 @@ assembly text:
return a;
}
+However, this interferes with optimizations like loop vectorization and may have
+an impact on the code generated. This is because the ``__asm`` statements are
+seen as real code having important side effects, which limits how the code
+around them can be transformed. If users want to make use of inline assembly
+to emit markers, then the recommendation is to always verify that the output
+assembly is equivalent to the assembly generated in the absence of markers.
+The `Clang options to emit optimization reports <https://clang.llvm.org/docs/UsersManual.html#options-to-emit-optimization-reports>`_
+can also help in detecting missed optimizations.
+
HOW LLVM-MCA WORKS
------------------
OpenPOWER on IntegriCloud