summaryrefslogtreecommitdiff
path: root/docs/LinkTimeOptimization.rst
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2013-04-08 18:41:23 +0000
committerDimitry Andric <dim@FreeBSD.org>2013-04-08 18:41:23 +0000
commit4a16efa3e43e35f0cc9efe3a67f620f0017c3d36 (patch)
tree06099edc18d30894081a822b756f117cbe0b8207 /docs/LinkTimeOptimization.rst
parent482e7bddf617ae804dc47133cb07eb4aa81e45de (diff)
Diffstat (limited to 'docs/LinkTimeOptimization.rst')
-rw-r--r--docs/LinkTimeOptimization.rst9
1 files changed, 4 insertions, 5 deletions
diff --git a/docs/LinkTimeOptimization.rst b/docs/LinkTimeOptimization.rst
index 7eacf0bd0d01e..c15abd325ed03 100644
--- a/docs/LinkTimeOptimization.rst
+++ b/docs/LinkTimeOptimization.rst
@@ -1,5 +1,3 @@
-.. _lto:
-
======================================================
LLVM Link Time Optimization: Design and Implementation
======================================================
@@ -85,9 +83,10 @@ invokes system linker.
return foo1();
}
-.. code-block:: bash
+To compile, run:
+
+.. code-block:: console
- --- command lines ---
% clang -emit-llvm -c a.c -o a.o # <-- a.o is LLVM bitcode file
% clang -c main.c -o main.o # <-- main.o is native object file
% clang a.o main.o -o main # <-- standard link command without modifications
@@ -96,7 +95,7 @@ invokes system linker.
visible symbol defined in LLVM bitcode file. The linker completes its usual
symbol resolution pass and finds that ``foo2()`` is not used
anywhere. This information is used by the LLVM optimizer and it
- removes ``foo2()``.</li>
+ removes ``foo2()``.
* As soon as ``foo2()`` is removed, the optimizer recognizes that condition ``i
< 0`` is always false, which means ``foo3()`` is never used. Hence, the