aboutsummaryrefslogtreecommitdiffstats
path: root/docs/FAQ.html
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-12-16 22:33:55 +0000
committerChris Lattner <sabre@nondot.org>2003-12-16 22:33:55 +0000
commita28e3cea1c80376a4992a6d06b27ea4276303a65 (patch)
treebe8cad1620f37e444b12fbd6f0187e9594308909 /docs/FAQ.html
parent0f7d2e8b8dd6ba590ed92643c4fffe6c394da581 (diff)
downloadexternal_llvm-a28e3cea1c80376a4992a6d06b27ea4276303a65.zip
external_llvm-a28e3cea1c80376a4992a6d06b27ea4276303a65.tar.gz
external_llvm-a28e3cea1c80376a4992a6d06b27ea4276303a65.tar.bz2
Add a faq entry for the demo page
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10488 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/FAQ.html')
-rw-r--r--docs/FAQ.html28
1 files changed, 23 insertions, 5 deletions
diff --git a/docs/FAQ.html b/docs/FAQ.html
index 79d2112..cc5d91c 100644
--- a/docs/FAQ.html
+++ b/docs/FAQ.html
@@ -70,6 +70,7 @@
<ol>
<li>What is this <tt>__main()</tt> call that gets inserted into
<tt>main()</tt>?</li>
+ <li>Where did all of my code go??</li>
</ol>
</li>
</ol>
@@ -406,11 +407,9 @@ directory inside of the LLVM GCC distribution.
<a name="cfe_code">Questions about code generated by the GCC front-end</a>
</div>
-<div class="question">
-<p>
+<div class="question"><p>
What is this <tt>__main()</tt> call that gets inserted into <tt>main()</tt>?
-</p>
-</div>
+</p></div>
<div class="answer">
<p>
@@ -426,10 +425,29 @@ The actual implementation of <tt>__main</tt> lives in the
<tt>llvm/runtime/GCCLibraries/crtend/</tt> directory in the source-base, and is
linked in automatically when you link the program.
</p>
-
</div>
+<!--=========================================================================-->
+
+<div class="question"><p>
+Where did all of my code go??
+</p></div>
+<div class="answer">
+<p>
+If you are using the LLVM demo page, you may often wonder what happened to all
+of the code that you typed in. Remember that the demo script is running the
+code through the LLVM optimizers, so if you code doesn't actually do anything
+useful, it might all be deleted.
+</p>
+
+<p>
+To prevent this, make sure that the code is actually needed. For example, if
+you are computing some expression, return the value from the function instead of
+leaving it in a local variable. If you really want to constrain the optimizer,
+you can read from and assign to <tt>volatile</tt> global variables.
+</p>
+</div>
<!-- *********************************************************************** -->
<!-- *********************************************************************** -->