</div>
+</div>
+
<!-- *********************************************************************** -->
<h2>
<a name="mc">The "MC" Layer</a>
<p>Consider the use of LLVM as a JIT linked into another application (perhaps
for <a href="http://llvm.org/Users.html">OpenGL, custom languages</a>,
<a href="http://llvm.org/devmtg/2010-11/Gritz-OpenShadingLang.pdf">shaders in
-movies</a>, etc</a>). Due to the design of static constructors, they must be
+movies</a>, etc). Due to the design of static constructors, they must be
executed at startup time of the entire application, regardless of whether or
how LLVM is used in that larger application. There are two problems with
this:</p>
</h2>
<!--=========================================================================-->
+<div>
+
<div class="doc_notes">
<p style="text-align:center;font-weight:bold">NOTE: This section deals with
legal matters but does not provide legal advice. We are not lawyers —
</div>
+</div>
+
<!-- *********************************************************************** -->
<hr>
<address>
</div>
+</div>
+
<!-- ======================================================================= -->
<h2>
<a name="asm">Asm Table Formats</a>
</h2>
<!-- *********************************************************************** -->
+<div>
+
<div class="question">
<p>Why are the LLVM source code and the front-end distributed under different
licenses?</p>
GPL, as explained in the first question above.</p>
</div>
+</div>
+
<!-- *********************************************************************** -->
<h2>
<a name="source">Source Code</a>
</h2>
<!-- *********************************************************************** -->
+<div>
+
<div class="question">
<p>In what language is LLVM written?</p>
</div>
</div>
+</div>
+
<!-- *********************************************************************** -->
<h2>
<a name="build">Build Problems</a>
</h2>
<!-- *********************************************************************** -->
+<div>
+
<div class="question">
<p>When I run configure, it finds the wrong C compiler.</p>
</div>
<p>We regret the inconvenience.</p>
</div>
+</div>
+
<!-- *********************************************************************** -->
<h2>
<a name="felangs">Source Languages</a>
</h2>
+<div>
+
<div class="question">
<p><a name="langs">What source languages are supported?</a></p>
</div>
Instruction</a>.</p>
</div>
+</div>
+
<!-- *********************************************************************** -->
<h2>
<a name="cfe">Using the GCC Front End</a>
</h2>
+<div>
+
<div class="question">
<p>When I compile software that uses a configure script, the configure script
thinks my system has all of the header files and libraries it is testing for.
order to have the result conform to the platform ABI.</p>
</div>
+</div>
+
<!-- *********************************************************************** -->
<h2>
<a name="cfe_code">Questions about code generated by the GCC front-end</a>
</h2>
+<div>
+
<div class="question">
<p><a name="iosinit">What is this <tt>llvm.global_ctors</tt> and
<tt>_GLOBAL__I__tmp_webcompile...</tt> stuff that happens when I <tt>#include
</div>
+</div>
+
<!-- *********************************************************************** -->
<hr>
<li><tt>cd <i>where-you-want-to-build-llvm</i></tt></li>
<li><tt>mkdir build</tt> (for building without polluting the source dir)</li>
<li><tt>cd build</tt></li>
- <li><tt>../llvm/configure [options]</tt></li>
- Some common options:
+ <li><tt>../llvm/configure [options]</tt>
+ <br>Some common options:
<ul>
<li><tt>--prefix=<i>directory</i></tt> -
<li><tt>--enable-assertions</tt> -
Compile with assertion checks enabled (default is YES).</li>
</ul>
-
+ </li>
<li><tt>make [-j]</tt> - The -j specifies the number of jobs (commands) to
run simultaneously. This builds both LLVM and Clang for Debug+Asserts mode.
The --enabled-optimized configure option is used to specify a Release build.</li>
</ul>
</li>
- </ol>
</ol>
parent = Libraries
required_libraries = Archive BitReader Core Support TransformUtils
</pre>
- </div class="doc_code">
+ </div>
<p>A full description of the exact sections and properties which are allowed
follows.</p>
</pre>
</div>
+</div>
+
<!-- _______________________________________________________________________ -->
<h4>
<a name="range">'<tt>range</tt>' Metadata</a>
</div>
-</div>
-
<!-- *********************************************************************** -->
<h2>
<a name="module_flags">Module Flags Metadata</a>
<div>
-<p><i>Replacing individual instructions</i></p>
+<h5><i>Replacing individual instructions</i></h5>
<p>Including "<a href="/doxygen/BasicBlockUtils_8h-source.html">llvm/Transforms/Utils/BasicBlockUtils.h</a>"
permits use of two very useful replace functions: <tt>ReplaceInstWithValue</tt>
<h5><a name="schanges_deleting">Deleting <tt>Instruction</tt>s</a></h5>
+<div>
<ul>
<li><tt>ReplaceInstWithValue</tt>
</pre></div></li>
</ul>
-<p><i>Replacing multiple uses of <tt>User</tt>s and <tt>Value</tt>s</i></p>
+</div>
+
+<h5><i>Replacing multiple uses of <tt>User</tt>s and <tt>Value</tt>s</i></h5>
<p>You can use <tt>Value::replaceAllUsesWith</tt> and
<tt>User::replaceUsesOfWith</tt> to change more than one use at a time. See the
<div>
<ul>
- <li><tt>Module::Module(std::string name = "")</tt></li>
-</ul>
+ <li><tt>Module::Module(std::string name = "")</tt>
-<p>Constructing a <a href="#Module">Module</a> is easy. You can optionally
+ <p>Constructing a <a href="#Module">Module</a> is easy. You can optionally
provide a name for it (probably based on the name of the translation unit).</p>
+ </li>
-<ul>
<li><tt>Module::iterator</tt> - Typedef for function list iterator<br>
<tt>Module::const_iterator</tt> - Typedef for const_iterator.<br>
<li>On Darwin, the ARM target now has a full-featured integrated assembler.
</li>
</ul>
-</div>
<h4>
<a name="armintegratedassembler">ARM Integrated Assembler</a>
<p>The assembler is Unified Syntax only (see ARM Architecural Reference Manual
for details). While there is some, and growing, support for pre-unfied (divided)
syntax, there are still significant gaps in that support.</p>
+</div>
+
</div>
<!--=========================================================================-->
<h3>
</div>
-</div>
-
<!--=========================================================================-->
<h3>
<a name="tools_changes">Tools Changes</a>
</tr>
</table>
-</div>
</div>
</div>
-<div>
<!-- ======================================================================= -->
<h3>
<a name="acceltable">Name Accelerator Tables</a>
</h3>
<!-- ======================================================================= -->
+<div>
<!-- ======================================================================= -->
<h4>
<a name="acceltableintroduction">Introduction</a>
</ul>
</div>
</div>
+</div>
<!-- *********************************************************************** -->
<dt><tt>str1#str2</tt></dt>
<dd>"#" (paste) is a shorthand for !strconcat. It may concatenate
things that are not quoted strings, in which case an implicit
- !cast<string> is done on the operand of the paste.</dd>
+ !cast<string> is done on the operand of the paste.</dd>
<dt><tt>!cast<type>(a)</tt></dt>
<dd>A symbol of type <em>type</em> obtained by looking up the string 'a' in
the symbol table. If the type of 'a' does not match <em>type</em>, TableGen
the <a href="TestSuiteMakefileGuide.html">Test Suite Makefile Guide.</a></p>
</div>
-</div>
-
<!-- *********************************************************************** -->
<hr>