[llvm] r329729 - [llvm-mca] fix formatting
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 10 10:56:24 PDT 2018
Author: spatel
Date: Tue Apr 10 10:56:24 2018
New Revision: 329729
URL: http://llvm.org/viewvc/llvm-project?rev=329729&view=rev
Log:
[llvm-mca] fix formatting
Modified:
llvm/trunk/docs/CommandGuide/llvm-mca.rst
Modified: llvm/trunk/docs/CommandGuide/llvm-mca.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CommandGuide/llvm-mca.rst?rev=329729&r1=329728&r2=329729&view=diff
==============================================================================
--- llvm/trunk/docs/CommandGuide/llvm-mca.rst (original)
+++ llvm/trunk/docs/CommandGuide/llvm-mca.rst Tue Apr 10 10:56:24 2018
@@ -41,20 +41,20 @@ assembly text:
.. code-block:: c++
-int foo(int a, int b) {
- __asm volatile("# LLVM-MCA-BEGIN foo");
- a += 42;
- __asm volatile("# LLVM-MCA-END");
- a *= b;
- return a;
-}
+ int foo(int a, int b) {
+ __asm volatile("# LLVM-MCA-BEGIN foo");
+ a += 42;
+ __asm volatile("# LLVM-MCA-END");
+ a *= b;
+ return a;
+ }
So for example, you can compile code with clang, output assembly, and pipe it
directly into llvm-mca for analysis:
.. code-block:: bash
-$ clang foo.cpp -O2 -target x86_64-unknown-unknown -S -o - | llvm-mca -mcpu=btver2
+ $ clang foo.cpp -O2 -target x86_64-unknown-unknown -S -o - | llvm-mca -mcpu=btver2
Multiple regions can be specified provided that they do not overlap. A code
region can have an optional description. If no user defined region is specified,
More information about the llvm-commits
mailing list