OSDN Git Service

[llvm-mca] fix formatting
authorSanjay Patel <spatel@rotateright.com>
Tue, 10 Apr 2018 17:56:24 +0000 (17:56 +0000)
committerSanjay Patel <spatel@rotateright.com>
Tue, 10 Apr 2018 17:56:24 +0000 (17:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@329729 91177308-0d34-0410-b5e6-96231b3b80d8

docs/CommandGuide/llvm-mca.rst

index d697511..0391307 100644 (file)
@@ -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,