From a28e3cea1c80376a4992a6d06b27ea4276303a65 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 16 Dec 2003 22:33:55 +0000 Subject: 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 --- docs/FAQ.html | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'docs/FAQ.html') 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 @@
  1. What is this __main() call that gets inserted into main()?
  2. +
  3. Where did all of my code go??
@@ -406,11 +407,9 @@ directory inside of the LLVM GCC distribution. Questions about code generated by the GCC front-end -
-

+

What is this __main() call that gets inserted into main()? -

-
+

@@ -426,10 +425,29 @@ The actual implementation of __main lives in the llvm/runtime/GCCLibraries/crtend/ directory in the source-base, and is linked in automatically when you link the program.

-
+ + +

+Where did all of my code go?? +

+
+

+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. +

+ +

+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 volatile global variables. +

+
-- cgit v1.1