blob: fa3317bb6e601408e52b4ba07addbf0e0995b089 [file] [log] [blame]
Misha Brukman500bc302003-11-22 00:38:41 +00001<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
3<html>
4<head>
Reid Spencer6454ed32004-11-18 18:38:58 +00005 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Misha Brukman500bc302003-11-22 00:38:41 +00006 <link rel="stylesheet" href="llvm.css" type="text/css">
Chris Lattnercaf06342007-05-09 04:58:11 +00007 <title>LLVM 2.0 Release Notes</title>
Misha Brukman500bc302003-11-22 00:38:41 +00008</head>
9<body>
Chris Lattner79c3fe12003-10-02 04:57:28 +000010
Chris Lattnercaf06342007-05-09 04:58:11 +000011<div class="doc_title">LLVM 2.0 Release Notes</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +000012
13<ol>
Misha Brukman500bc302003-11-22 00:38:41 +000014 <li><a href="#intro">Introduction</a></li>
15 <li><a href="#whatsnew">What's New?</a></li>
Chris Lattner4b538b92004-04-30 22:17:12 +000016 <li><a href="GettingStarted.html">Installation Instructions</a></li>
Misha Brukman500bc302003-11-22 00:38:41 +000017 <li><a href="#portability">Portability and Supported Platforms</a></li>
Chris Lattner79c3fe12003-10-02 04:57:28 +000018 <li><a href="#knownproblems">Known Problems</a>
Misha Brukman500bc302003-11-22 00:38:41 +000019 <li><a href="#additionalinfo">Additional Information</a></li>
Chris Lattner79c3fe12003-10-02 04:57:28 +000020</ol>
21
Chris Lattner7911ce22004-05-23 21:07:27 +000022<div class="doc_author">
Chris Lattnerc463b272005-10-29 07:07:09 +000023 <p>Written by the <a href="http://llvm.org">LLVM Team</a><p>
Misha Brukman500bc302003-11-22 00:38:41 +000024</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +000025
26<!-- *********************************************************************** -->
Misha Brukman500bc302003-11-22 00:38:41 +000027<div class="doc_section">
28 <a name="intro">Introduction</a>
29</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +000030<!-- *********************************************************************** -->
31
Misha Brukman500bc302003-11-22 00:38:41 +000032<div class="doc_text">
33
34<p>This document contains the release notes for the LLVM compiler
Chris Lattnercaf06342007-05-09 04:58:11 +000035infrastructure, release 2.0. Here we describe the status of LLVM, including any
36known problems and major improvements from the previous release. All LLVM
37releases may be downloaded from the <a href="http://llvm.org/releases/">LLVM
38releases web site</a>.
Chris Lattner19092612003-10-02 16:38:05 +000039
Chris Lattner7506b1d2004-12-07 08:04:13 +000040<p>For more information about LLVM, including information about the latest
Chris Lattnerc463b272005-10-29 07:07:09 +000041release, please check out the <a href="http://llvm.org/">main LLVM
Chris Lattner47ad72c2003-10-07 21:38:31 +000042web site</a>. If you have questions or comments, the <a
43href="http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVM developer's mailing
Misha Brukman500bc302003-11-22 00:38:41 +000044list</a> is a good place to send them.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +000045
Chris Lattner78bf32b2004-12-09 22:22:58 +000046<p>Note that if you are reading this file from CVS or the main LLVM web page,
47this document applies to the <i>next</i> release, not the current one. To see
48the release notes for the current or previous releases, see the <a
Chris Lattnerc463b272005-10-29 07:07:09 +000049href="http://llvm.org/releases/">releases page</a>.</p>
Misha Brukman500bc302003-11-22 00:38:41 +000050
51</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +000052
53<!-- *********************************************************************** -->
Misha Brukman500bc302003-11-22 00:38:41 +000054<div class="doc_section">
55 <a name="whatsnew">What's New?</a>
56</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +000057<!-- *********************************************************************** -->
58
Misha Brukman500bc302003-11-22 00:38:41 +000059<div class="doc_text">
60
Chris Lattnercaf06342007-05-09 04:58:11 +000061<p>This is the eleventh public release of the LLVM Compiler Infrastructure.
Chris Lattnerf01b0b52007-05-09 05:27:05 +000062Being the first major release since 1.0, this release is different in several
63ways from our previous releases:</p>
64
65<ol>
66<li>We took this as an opportunity to
Chris Lattnercaf06342007-05-09 04:58:11 +000067break backwards compatibility with the LLVM 1.x bytecode and .ll file format.
68If you have LLVM 1.9 .ll files that you would like to upgrade to LLVM 2.x, we
Lauro Ramos Venanciobe1b1b12007-05-12 02:36:41 +000069recommend the use of the stand alone <a href="#llvm-upgrade">llvm-upgrade</a>
Chris Lattnerbf8abe32007-05-17 19:58:57 +000070tool (which is included with 2.0). We intend to keep compatibility with .ll
71and .bc formats within the 2.x release series, like we did within the 1.x
72series.</li>
Chris Lattnerf01b0b52007-05-09 05:27:05 +000073<li>There are several significant change to the LLVM IR and internal APIs, such
74 as a major overhaul of the type system, the completely new bitcode file
Chris Lattner60893e52007-05-18 06:33:02 +000075 format, etc (described below).</li>
Chris Lattnerf01b0b52007-05-09 05:27:05 +000076<li>We designed the release around a 6 month release cycle instead of the usual
77 3-month cycle. This gave us extra time to develop and test some of the
78 more invasive features in this release.</li>
Chris Lattner60893e52007-05-18 06:33:02 +000079<li>LLVM 2.0 no longer supports the llvm-gcc3 front-end. Users are required to
80 upgrade to llvm-gcc4. llvm-gcc4 includes many features over
81 llvm-gcc3, is faster, and is <a href="CFEBuildInstrs.html">much easier to
82 build from source</a>.</li>
Chris Lattnerf01b0b52007-05-09 05:27:05 +000083</ol>
Chris Lattnercaf06342007-05-09 04:58:11 +000084
Chris Lattnerf01b0b52007-05-09 05:27:05 +000085<p>Note that while this is a major version bump, this release has been
86 extensively tested on a wide range of software. It is easy to say that this
Chris Lattner60893e52007-05-18 06:33:02 +000087 is our best release yet, in terms of both features and correctness. This is
88 the first LLVM release to correctly compile and optimize major software like
89 LLVM itself, Mozilla/Seamonkey, Qt 4.3rc1, kOffice, etc out of the box on
90 linux/x86.
91 </p>
Chris Lattnera5099962003-12-06 20:22:41 +000092
Chris Lattner80453c92004-05-24 04:50:25 +000093</div>
94
Chris Lattnera5099962003-12-06 20:22:41 +000095<!--=========================================================================-->
Chris Lattner8a458762005-05-15 05:44:51 +000096<div class="doc_subsection">
Chris Lattnercaf06342007-05-09 04:58:11 +000097<a name="newfeatures">New Features in LLVM 2.0</a>
Chris Lattner44c933e2006-04-18 06:18:36 +000098</div>
99
Chris Lattner738bd302006-04-18 06:32:08 +0000100<!--_________________________________________________________________________-->
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000101<div class="doc_subsubsection"><a name="majorchanges">Major Changes</a></div>
102<div class="doc_text">
Chris Lattner60893e52007-05-18 06:33:02 +0000103
104<p>Changes to the LLVM IR itself:</p>
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000105
106<ul>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000107
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000108<li>Integer types are now completely signless. This means that we
109 have types like i8/i16/i32 instead of ubyte/sbyte/short/ushort/int
110 etc. LLVM operations that depend on sign have been split up into
Chris Lattner60893e52007-05-18 06:33:02 +0000111 separate instructions (<a href="http://llvm.org/PR950">PR950</a>). This
112 eliminates cast instructions that just change the sign of the operands (e.g.
113 int -> uint), which reduces the size of the IR and makes optimizers
114 simpler to write.</li>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000115
Chris Lattner60893e52007-05-18 06:33:02 +0000116<li>Integer types with arbitrary bitwidths (e.g. i13, i36, i42, i1057, etc) are
117 now supported in the LLVM IR and optimizations (<a
118 href="http://llvm.org/PR1043">PR1043</a>). However, neither llvm-gcc
119 (<a href="http://llvm.org/PR1284">PR1284</a>) nor the native code generators
120 (<a href="http://llvm.org/PR1270">PR1270</a>) support non-standard width
121 integers yet.</li>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000122
Chris Lattner60893e52007-05-18 06:33:02 +0000123<li>'Type planes' have been removed (<a href="http://llvm.org/PR411">PR411</a>).
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000124 It is no longer possible to have two values with the same name in the
125 same symbol table. This simplifies LLVM internals, allowing significant
126 speedups.</li>
127
128<li>Global variables and functions in .ll files are now prefixed with
129 @ instead of % (<a href="http://llvm.org/PR645">PR645</a>).</li>
130
131<li>The LLVM 1.x "bytecode" format has been replaced with a
Chris Lattner60893e52007-05-18 06:33:02 +0000132 completely new binary representation, named 'bitcode'. The <a
133 href="BitCodeFormat.html">Bitcode Format</a> brings a
134 number of advantages to the LLVM over the old bytecode format: it is denser
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000135 (files are smaller), more extensible, requires less memory to read,
136 is easier to keep backwards compatible (so LLVM 2.5 will read 2.0 .bc
137 files), and has many other nice features.</li>
138
Chris Lattner60893e52007-05-18 06:33:02 +0000139<li>Load and store instructions now track the alignment of their pointer
140 (<a href="http://www.llvm.org/PR400">PR400</a>). This allows the IR to
141 express loads that are not sufficiently aligned (e.g. due to '<tt>#pragma
142 packed</tt>') or to capture extra alignment information.</li>
143</ul>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000144
Chris Lattner60893e52007-05-18 06:33:02 +0000145<p>Major new features:</p>
146
147<ul>
148
149<li>A number of ELF features are now supported by LLVM, including 'visibility',
150 extern weak linkage, Thread Local Storage (TLS) with the <tt>__thread</tt>
151 keyword, and symbol aliases.
152 Among other things, this means that many of the special options needed to
153 configure llvm-gcc on linux are no longer needed, and special hacks to build
154 large C++ libraries like Qt are not needed.</li>
155
156<li>LLVM now has a new MSIL backend. llc -march=msil will now turn LLVM
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000157 into MSIL (".net") bytecode. This is still fairly early development
158 with a number of limitations.</li>
159
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000160</ul>
Chris Lattner60893e52007-05-18 06:33:02 +0000161
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000162</div>
163
164
165<!--_________________________________________________________________________-->
166<div class="doc_subsubsection"><a name="llvmgccfeatures">llvm-gcc
167Improvements</a></div>
168<div class="doc_text">
169<p>New features include:
170</p>
171
172<ul>
Chris Lattner60893e52007-05-18 06:33:02 +0000173<li>Precompiled Headers (PCH) are now supported.</li>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000174
Chris Lattner60893e52007-05-18 06:33:02 +0000175<li>"<tt>#pragma packed</tt>" is now supported, as are the various features
176 described above (visibility, extern weak linkage, __thread, aliases,
177 etc).</li>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000178
179<li>Tracking function parameter/result attributes is now possible.</li>
180
Chris Lattner60893e52007-05-18 06:33:02 +0000181<li>Many internal enhancements have been added, such as improvements to
182 NON_LVALUE_EXPR, arrays with non-zero base, structs with variable sized
183 fields, VIEW_CONVERT_EXPR, CEIL_DIV_EXPR, nested functions, and many other
184 things. This is primarily to supports non-C GCC front-ends, like Ada.</li>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000185
Chris Lattner60893e52007-05-18 06:33:02 +0000186<li>It is simpler to configure llvm-gcc for linux.</li>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000187
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000188</ul>
189
190</div>
191
192<!--_________________________________________________________________________-->
Chris Lattner26299222006-11-18 07:51:14 +0000193<div class="doc_subsubsection"><a name="optimizer">Optimizer
194Improvements</a></div>
Chris Lattner60893e52007-05-18 06:33:02 +0000195
Chris Lattner738bd302006-04-18 06:32:08 +0000196<div class="doc_text">
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000197<p>New features include:
198</p>
Chris Lattner26299222006-11-18 07:51:14 +0000199
200<ul>
Chris Lattner60893e52007-05-18 06:33:02 +0000201<li>The <a href="WritingAnLLVMPass.html">pass manager</a> has been entirely
202 rewritten, making it significantly smaller, simpler, and more extensible.
203 Support has been added to run FunctionPasses interlaced with
204 CallGraphSCCPasses, and we now support loop transformations explicitly with
205 LoopPass.</li>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000206
Chris Lattner60893e52007-05-18 06:33:02 +0000207<li>The <tt>-scalarrepl</tt> pass can now promote unions containing FP values
208 into a register, it can also handle unions of vectors of the same
209 size.</li>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000210
Chris Lattner60893e52007-05-18 06:33:02 +0000211<li>LLVM 2.0 includes a new loop rotation pass, which converts "for loops" into
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000212 "do/while loops", where the condition is at the bottom of the loop.</li>
213
Chris Lattner60893e52007-05-18 06:33:02 +0000214<li>The Loop Strength Reduction pass has been improved, and support added
215 for sinking expressions across blocks to reduce register pressure.</li>
216
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000217<li>ModulePasses may now use the result of FunctionPasses.</li>
218
Chris Lattner60893e52007-05-18 06:33:02 +0000219<li>The [Post]DominatorSet classes have been removed from LLVM and clients
220 switched to use the far-more-efficient ETForest class instead.</li>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000221
Chris Lattner60893e52007-05-18 06:33:02 +0000222<li>The ImmediateDominator class has also been removed, and clients have been
223 switched to use DominatorTree instead.</li>
224
225<li>The predicate simplifier pass has been improved, making it able to do
226 simple value range propagation and eliminate more conditionals.</li>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000227
Chris Lattner26299222006-11-18 07:51:14 +0000228</ul>
229
Chris Lattner738bd302006-04-18 06:32:08 +0000230</div>
231
Chris Lattner1c1a85c2006-04-19 04:02:47 +0000232<!--_________________________________________________________________________-->
Chris Lattner26299222006-11-18 07:51:14 +0000233<div class="doc_subsubsection"><a name="codegen">Code
234Generator Enhancements</a></div>
235
Chris Lattner1c1a85c2006-04-19 04:02:47 +0000236<div class="doc_text">
Chris Lattner26299222006-11-18 07:51:14 +0000237<p>
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000238New features include:
Chris Lattner26299222006-11-18 07:51:14 +0000239</p>
240
241<ul>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000242
Chris Lattner60893e52007-05-18 06:33:02 +0000243<li>Support was added for software floating point, which allows LLVM to target
244 chips that don't have hardware FPUs (e.g. ARM thumb mode).</li>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000245
246<li>A new register scavenger has been implemented, which is useful for
247 finding free registers after register allocation. This is useful when
248 rewriting frame references on RISC targets, for example.</li>
249
250<li>Heuristics have been added to avoid coalescing vregs with very large live
Chris Lattner60893e52007-05-18 06:33:02 +0000251 ranges to physregs. This was bad because it effectively pinned the physical
252 register for the entire lifetime of the virtual register (<a
253 href="http://llvm.org/PR711">PR711</a>).</li>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000254
255<li>Support now exists for very simple (but still very useful)
256 rematerialization the register allocator, enough to move
257 instructions like "load immediate" and constant pool loads.</li>
258
Chris Lattner60893e52007-05-18 06:33:02 +0000259<li>Switch statement lowering is significantly better, improving codegen for
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000260 sparse switches that have dense subregions, and implemented support
261 for the shift/and trick.</li>
262
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000263<li>Added support for tracking physreg sub-registers and super-registers
264 in the code generator, as well as extensive register
265 allocator changes to track them.</li>
266
267<li>There is initial support for virtreg sub-registers
268 (<a href="http://llvm.org/PR1350">PR1350</a>).</li>
269
Chris Lattner26299222006-11-18 07:51:14 +0000270</ul>
271
Chris Lattner60893e52007-05-18 06:33:02 +0000272<p>
273Other improvements include:
274</p>
275
276<ul>
277
278<li>Inline assembly support is much more solid that before.
279 The two primary features still missing are support for 80-bit floating point
280 stack registers on X86 (<a href="http://llvm.org/PR879">PR879</a>), and
281 support for inline asm in the C backend (<a
282 href="http://llvm.org/PR802">PR802</a>).</li>
283
284<li>DWARF debug information generation has been improved. LLVM now passes
285 most of the GDB testsuite on MacOS and debug info is more dense.</li>
286
287<li>Codegen support for Zero-cost DWARF exception handling has been added (<a
288 href="http://llvm.org/PR592">PR592</a>). It is mostly
289 complete and just in need of continued bug fixes and optimizations at
290 this point. However, support in llvm-g++ is disabled with an
291 #ifdef for the 2.0 release (<a
292 href="http://llvm.org/PR870">PR870</a>).</li>
293
294<li>The code generator now has more accurate and general hooks for
295 describing addressing modes ("isLegalAddressingMode") to
296 optimizations like loop strength reduction and code sinking.</li>
297
298<li>Progress has been made on a direct Mach-o .o file writer. Many small
299 apps work, but it is still not quite complete.</li>
300
301</ul>
302
Chris Lattner26299222006-11-18 07:51:14 +0000303<p>In addition, the LLVM target description format has itself been extended in
304 several ways:</p>
305
306<ul>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000307<li>Extended TargetData to support better target parameterization in
308 the .ll/.bc files, eliminating the 'pointersize/endianness' attributes
309 in the files (<a href="http://llvm.org/PR761">PR761</a>).</li>
310
311<li>TargetData was generalized for finer grained alignment handling,
312 handling of vector alignment, and handling of preferred alignment</li>
313
314<li>LLVM now supports describing target calling conventions
315 explicitly in .td files, reducing the amount of C++ code that needs
316 to be written for a port.</li>
317
Chris Lattner26299222006-11-18 07:51:14 +0000318</ul>
319
Chris Lattner1c1a85c2006-04-19 04:02:47 +0000320</div>
Chris Lattner44c933e2006-04-18 06:18:36 +0000321
322<!--_________________________________________________________________________-->
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000323<div class="doc_subsubsection"><a name="specifictargets">Target-Specific
324Improvements</a></div>
325
326<div class="doc_text">
327
Chris Lattner60893e52007-05-18 06:33:02 +0000328<p>X86-specific Code Generator Enhancements:
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000329</p>
330
331<ul>
Chris Lattner60893e52007-05-18 06:33:02 +0000332<li>The MMX instruction set is now supported through intrinsics.</li>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000333<li>The scheduler was improved to better reduce register pressure on
Chris Lattner60893e52007-05-18 06:33:02 +0000334 X86 and other targets that are register pressure sensitive.</li>
335<li>Linux/x86-64 support is much better.</li>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000336<li>PIC support for linux/x86 has been added.</li>
Chris Lattner60893e52007-05-18 06:33:02 +0000337<li>The X86 backend now supports the GCC regparm attribute.</li>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000338<li>LLVM now supports inline asm with multiple constraint letters per operand
339 (like "ri") which is common in X86 inline asms.</li>
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000340</ul>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000341
Chris Lattner60893e52007-05-18 06:33:02 +0000342<p>ARM-specific Code Generator Enhancements:</p>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000343
344<ul>
Chris Lattner60893e52007-05-18 06:33:02 +0000345<li>The ARM code generator is now stable and fully supported.</li>
346
347<li>There are major new features, including support for ARM
348 v4-v6 chips, vfp support, soft float point support, pre/postinc support,
349 load/store multiple generation, constant pool entry motion (to support
350 large functions), and inline asm support, weak linkage support, static
351 ctor/dtor support and many bug fixes.</li>
352<li>Added support for Thumb code generation (<tt>llc -march=thumb</tt>).</li>
353
354<li>The ARM backend now supports the ARM AAPCS/EABI ABI and PIC codegen on
355 arm/linux.</li>
356
357<li>Several bugs were fixed for DWARF debug info generation on arm/linux.</li>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000358</ul>
359
Chris Lattner60893e52007-05-18 06:33:02 +0000360<p>PowerPC-specific Code Generator Enhancements:</p>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000361
362<ul>
363<li>The PowerPC 64 JIT now supports addressing code loaded above the 2G
364 boundary.</li>
365
366<li>Improved support for the Linux/ppc ABI and the linux/ppc JIT is fully
367 functional now. llvm-gcc and static compilation are not fully supported
Chris Lattnerbf8abe32007-05-17 19:58:57 +0000368 yet though.</li>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000369
Chris Lattner60893e52007-05-18 06:33:02 +0000370<li>Many PowerPC 64 bug fixes.</li>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000371
372</ul>
373
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000374</div>
375
376
377<!--_________________________________________________________________________-->
Chris Lattnerd9ea0172006-08-08 17:27:28 +0000378<div class="doc_subsubsection"><a name="other">Other Improvements</a></div>
Chris Lattner58504a62006-02-05 06:39:36 +0000379<div class="doc_text">
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000380
381<p>This release includes many other improvements, including
382performance work, specifically designed to tune datastructure
383usage. This makes several critical components faster.</p>
Chris Lattnerd9ea0172006-08-08 17:27:28 +0000384
385<p>More specific changes include:</p>
386
Chris Lattner58504a62006-02-05 06:39:36 +0000387<ul>
Tanya Lattnerb6ec3a92007-05-16 23:25:46 +0000388<li>LLVM no longer relies on static destructors to shut itself down. Instead,
389 it lazily initializes itself and shuts down when llvm_shutdown() is
390 explicitly called.</li>
391
392<li>LLVM now has significantly fewer static constructors, reducing startup time.
393 </li>
394
395<li>Several classes have been refactored to reduce the amount of code that
396 gets linked into apps that use the JIT.</li>
397
398<li>Construction of intrinsic function declarations has been simplified.</li>
399
400<li>The llvm-upgrade tool now exists. This migrates LLVM 1.9 .ll files to
401 LLVM 2.0 syntax.</li>
402
403<li>The gccas/gccld tools have been removed.</li>
404
405<li>Support has been added to llvm-test for running on low-memory
406 or slow machines (make SMALL_PROBLEM_SIZE=1).</li>
407
408<li>llvm-test is now more portable and should build with MS Visual Studio.</li>
409
Chris Lattner58504a62006-02-05 06:39:36 +0000410</ul>
411</div>
John Criswelle531ec52005-06-29 16:22:34 +0000412
Chris Lattnerbfb17ab2007-05-17 21:41:31 +0000413<!--_________________________________________________________________________-->
414<div class="doc_subsubsection"><a name="apichanges">API Changes</a></div>
415<div class="doc_text">
416
417<p>LLVM 2.0 contains a revamp of the type system and several other significant
418internal changes. If you are programming to the C++ API, be aware of the
419following major changes:</p>
420
421<ul>
Chris Lattner60893e52007-05-18 06:33:02 +0000422<li>Pass registration is slightly different in LLVM 2.0 (you now need an
Chris Lattnerbfb17ab2007-05-17 21:41:31 +0000423 intptr_t in your constructor), as explained in the <a
424 href="WritingAnLLVMPass.html#basiccode">Writing an LLVM Pass</a>
425 document.</li>
426
427<li><tt>ConstantBool</tt>, <tt>ConstantIntegral</tt> and <tt>ConstantInt</tt>
428 classes have been merged together, we now just have
429 <tt>ConstantInt</tt>.</li>
430
431<li><tt>Type::IntTy</tt>, <tt>Type::UIntTy</tt>, <tt>Type::SByteTy</tt>, ... are
432 replaced by <tt>Type::Int8Ty</tt>, <tt>Type::Int16Ty</tt>, etc. LLVM types
433 have always corresponded to fixed size types
434 (e.g. long was always 64-bits), but the type system no longer includes
435 information about the sign of the type.</li>
436
437<li>Several classes (<tt>CallInst</tt>, <tt>GetElementPtrInst</tt>,
438 <tt>ConstantArray</tt>, etc), that once took <tt>std::vector</tt> as
439 arguments now take ranges instead. For example, you can create a
440 <tt>GetElementPtrInst</tt> with code like:
441
442 <pre>
443 Value *Ops[] = { Op1, Op2, Op3 };
444 GEP = new GetElementPtrInst(BasePtr, Ops, 3);
445 </pre>
446
447 This avoids creation of a temporary vector (and a call to malloc/free). If
448 you have an std::vector, use code like this:
449 <pre>
450 std::vector&lt;Value*&gt; Ops = ...;
451 GEP = new GetElementPtrInst(BasePtr, &amp;Ops[0], Ops.size());
452 </pre>
453
454 </li>
455
456<li>CastInst is now abstract and its functionality is split into several parts,
457 one for each of the <a href="LangRef.html#convertops">new cast
458 instructions</a>.</li>
459
460<li><tt>Instruction::getNext()/getPrev()</tt> are now private (along with
461 <tt>BasicBlock::getNext</tt>, etc), for efficiency reasons (they are now no
462 longer just simple pointers). Please use BasicBlock::iterator, etc instead.
463</li>
464
465<li><tt>Module::getNamedFunction()</tt> is now called
466 <tt>Module::getFunction()</tt>.</li>
467
468<li><tt>SymbolTable.h</tt> has been split into <tt>ValueSymbolTable.h</tt> and
469<tt>TypeSymbolTable.h</tt>.</li>
470</ul>
471</div>
Chris Lattnerc5d658a2006-03-03 00:34:26 +0000472
473
Chris Lattner19092612003-10-02 16:38:05 +0000474<!-- *********************************************************************** -->
Misha Brukman500bc302003-11-22 00:38:41 +0000475<div class="doc_section">
476 <a name="portability">Portability and Supported Platforms</a>
477</div>
Chris Lattner19092612003-10-02 16:38:05 +0000478<!-- *********************************************************************** -->
479
Misha Brukman500bc302003-11-22 00:38:41 +0000480<div class="doc_text">
481
John Criswell0b5b5e92004-12-08 20:35:47 +0000482<p>LLVM is known to work on the following platforms:</p>
Chris Lattner4654bdb2004-06-01 18:22:41 +0000483
484<ul>
Reid Spencer00812e22005-05-17 02:47:27 +0000485 <li>Intel and AMD machines running Red Hat Linux, Fedora Core and FreeBSD
486 (and probably other unix-like systems).</li>
Chris Lattner7ea41e32006-08-09 04:10:32 +0000487<li>Intel and AMD machines running on Win32 using MinGW libraries (native)</li>
Chris Lattner4654bdb2004-06-01 18:22:41 +0000488<li>Sun UltraSPARC workstations running Solaris 8.</li>
Chris Lattner7506b1d2004-12-07 08:04:13 +0000489<li>Intel and AMD machines running on Win32 with the Cygwin libraries (limited
490 support is available for native builds with Visual C++).</li>
Chris Lattner26299222006-11-18 07:51:14 +0000491<li>PowerPC and X86-based Mac OS X systems, running 10.2 and above in 32-bit and
492 64-bit modes.</li>
John Criswell9321fa82005-05-13 20:28:15 +0000493<li>Alpha-based machines running Debian GNU/Linux.</li>
494<li>Itanium-based machines running Linux and HP-UX.</li>
Chris Lattner4654bdb2004-06-01 18:22:41 +0000495</ul>
496
Brian Gaekeb0fd7612004-05-09 05:28:35 +0000497<p>The core LLVM infrastructure uses
498<a href="http://www.gnu.org/software/autoconf/">GNU autoconf</a> to adapt itself
499to the machine and operating system on which it is built. However, minor
500porting may be required to get LLVM to work on new platforms. We welcome your
501portability patches and reports of successful builds or error messages.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000502
Misha Brukman500bc302003-11-22 00:38:41 +0000503</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000504
505<!-- *********************************************************************** -->
Misha Brukman500bc302003-11-22 00:38:41 +0000506<div class="doc_section">
507 <a name="knownproblems">Known Problems</a>
508</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000509<!-- *********************************************************************** -->
510
Misha Brukman500bc302003-11-22 00:38:41 +0000511<div class="doc_text">
512
513<p>This section contains all known problems with the LLVM system, listed by
Chris Lattner79c3fe12003-10-02 04:57:28 +0000514component. As new problems are discovered, they will be added to these
Chris Lattner5eccca42003-12-12 21:22:16 +0000515sections. If you run into a problem, please check the <a
Chris Lattnerc463b272005-10-29 07:07:09 +0000516href="http://llvm.org/bugs/">LLVM bug database</a> and submit a bug if
Chris Lattner5eccca42003-12-12 21:22:16 +0000517there isn't already one.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000518
Misha Brukman500bc302003-11-22 00:38:41 +0000519</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000520
Chris Lattnerf5ee1702004-03-14 02:03:02 +0000521<!-- ======================================================================= -->
522<div class="doc_subsection">
523 <a name="experimental">Experimental features included with this release</a>
524</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000525
Chris Lattnerf5ee1702004-03-14 02:03:02 +0000526<div class="doc_text">
527
Misha Brukman6df9e2c2004-05-12 21:46:05 +0000528<p>The following components of this LLVM release are either untested, known to
529be broken or unreliable, or are in early development. These components should
530not be relied on, and bugs should not be filed against them, but they may be
531useful to some people. In particular, if you would like to work on one of these
Chris Lattner49e693e2006-08-09 04:08:52 +0000532components, please contact us on the <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVMdev list</a>.</p>
Chris Lattnerf5ee1702004-03-14 02:03:02 +0000533
534<ul>
Chris Lattner44c933e2006-04-18 06:18:36 +0000535<li>The <tt>-cee</tt> pass is known to be buggy, and may be removed in in a
536 future release.</li>
Chris Lattner0d77e052007-05-09 06:23:58 +0000537<li>C++ EH support</li>
Chris Lattner58504a62006-02-05 06:39:36 +0000538<li>The IA64 code generator is experimental.</li>
Chris Lattnerc463b272005-10-29 07:07:09 +0000539<li>The Alpha JIT is experimental.</li>
Chris Lattner44c933e2006-04-18 06:18:36 +0000540<li>"<tt>-filetype=asm</tt>" (the default) is the only supported value for the
541 <tt>-filetype</tt> llc option.</li>
Chris Lattnerf5ee1702004-03-14 02:03:02 +0000542</ul>
543
544</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000545
Misha Brukman500bc302003-11-22 00:38:41 +0000546<!-- ======================================================================= -->
547<div class="doc_subsection">
Chris Lattner26299222006-11-18 07:51:14 +0000548 <a name="x86-be">Known problems with the X86 back-end</a>
John Criswellc0c186d2005-11-08 21:11:33 +0000549</div>
550
551<div class="doc_text">
552
553<ul>
Chris Lattner26299222006-11-18 07:51:14 +0000554<li>The X86 backend does not yet support <a href="http://llvm.org/PR879">inline
Chris Lattnercaf06342007-05-09 04:58:11 +0000555 assembly that uses the X86 floating point stack</a>.</li>
Chris Lattner26299222006-11-18 07:51:14 +0000556</ul>
557
558</div>
559
560<!-- ======================================================================= -->
561<div class="doc_subsection">
562 <a name="ppc-be">Known problems with the PowerPC back-end</a>
563</div>
564
565<div class="doc_text">
566
567<ul>
568<li><a href="http://llvm.org/PR642">PowerPC backend does not correctly
569implement ordered FP comparisons</a>.</li>
Nicolas Geoffraye4285dc2007-05-15 09:21:28 +0000570<li>The Linux PPC32/ABI support needs testing for the interpreter and static
571compilation, and lacks Dwarf debugging informations.
Chris Lattner26299222006-11-18 07:51:14 +0000572</ul>
573
574</div>
575
576<!-- ======================================================================= -->
577<div class="doc_subsection">
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000578 <a name="arm-be">Known problems with the ARM back-end</a>
579</div>
580
581<div class="doc_text">
582
583<ul>
584<li>The Thumb mode works only on ARMv6 or higher processors. On sub-ARMv6
585processors, any thumb program compiled with LLVM crashes or produces wrong
586results. (<a href="http://llvm.org/PR1388">PR1388</a>)</li>
587<li>Compilation for ARM Linux OABI (old ABI) is supported, but not fully tested.
588</li>
589<li>QEMU-ARM (<= 0.9.0) wrongly executes programs compiled with LLVM. A non-affected QEMU version must be used or this
Chris Lattnerbcd10f12007-05-17 22:03:43 +0000590<a href="http://cvs.savannah.nongnu.org/viewcvs/qemu/target-arm/translate.c?root=qemu&amp;r1=1.46&amp;r2=1.47&amp;makepatch=1&amp;diff_format=h">
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000591patch</a> must be applied on QEMU.</li>
592</ul>
593
594</div>
595
596<!-- ======================================================================= -->
597<div class="doc_subsection">
Chris Lattner26299222006-11-18 07:51:14 +0000598 <a name="sparc-be">Known problems with the SPARC back-end</a>
599</div>
600
601<div class="doc_text">
602
603<ul>
604<li>The SPARC backend only supports the 32-bit SPARC ABI (-m32), it does not
605 support the 64-bit SPARC ABI (-m64).</li>
606</ul>
607
608</div>
609
610<!-- ======================================================================= -->
611<div class="doc_subsection">
Chris Lattner26299222006-11-18 07:51:14 +0000612 <a name="alpha-be">Known problems with the Alpha back-end</a>
613</div>
614
615<div class="doc_text">
616
617<ul>
618
619<li>On 21164s, some rare FP arithmetic sequences which may trap do not have the
620appropriate nops inserted to ensure restartability.</li>
621
John Criswellc0c186d2005-11-08 21:11:33 +0000622</ul>
623</div>
624
Chris Lattner26299222006-11-18 07:51:14 +0000625<!-- ======================================================================= -->
626<div class="doc_subsection">
627 <a name="ia64-be">Known problems with the IA64 back-end</a>
628</div>
629
630<div class="doc_text">
631
632<ul>
633
634<li>C++ programs are likely to fail on IA64, as calls to <tt>setjmp</tt> are
635made where the argument is not 16-byte aligned, as required on IA64. (Strictly
636speaking this is not a bug in the IA64 back-end; it will also be encountered
637when building C++ programs using the C back-end.)</li>
638
639<li>The C++ front-end does not use <a href="http://llvm.org/PR406">IA64
640ABI compliant layout of v-tables</a>. In particular, it just stores function
641pointers instead of function descriptors in the vtable. This bug prevents
642mixing C++ code compiled with LLVM with C++ objects compiled by other C++
643compilers.</li>
644
645<li>There are a few ABI violations which will lead to problems when mixing LLVM
646output with code built with other compilers, particularly for floating-point
647programs.</li>
648
649<li>Defining vararg functions is not supported (but calling them is ok).</li>
650
Chris Lattnercaf06342007-05-09 04:58:11 +0000651<li>The Itanium backend has bitrotted somewhat.</li>
Chris Lattner26299222006-11-18 07:51:14 +0000652</ul>
653
654</div>
655
656<!-- ======================================================================= -->
657<div class="doc_subsection">
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000658 <a name="c-be">Known problems with the C back-end</a>
Chris Lattner26299222006-11-18 07:51:14 +0000659</div>
660
661<div class="doc_text">
662
663<ul>
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000664<li><a href="http://llvm.org/PR802">The C backend does not support inline
665 assembly code</a>.</li>
Chris Lattner26299222006-11-18 07:51:14 +0000666</ul>
667
668</div>
John Criswellc0c186d2005-11-08 21:11:33 +0000669
Misha Brukman500bc302003-11-22 00:38:41 +0000670
671<!-- ======================================================================= -->
672<div class="doc_subsection">
673 <a name="c-fe">Known problems with the C front-end</a>
674</div>
Chris Lattner47588f92003-10-02 05:07:23 +0000675
Chris Lattner79c3fe12003-10-02 04:57:28 +0000676<!-- _______________________________________________________________________ -->
Chris Lattnerb40efb32003-12-14 05:03:43 +0000677<div class="doc_subsubsection">Bugs</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000678
Misha Brukman500bc302003-11-22 00:38:41 +0000679<div class="doc_text">
Chris Lattnerc5d658a2006-03-03 00:34:26 +0000680
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000681<p>llvm-gcc4 does not currently support <a href="http://llvm.org/PR869">Link-Time
682Optimization</a> on most platforms "out-of-the-box". Please inquire on the
683llvmdev mailing list if you are interested.</p>
Chris Lattnerd9ea0172006-08-08 17:27:28 +0000684
Misha Brukman500bc302003-11-22 00:38:41 +0000685</div>
686
687<!-- _______________________________________________________________________ -->
688<div class="doc_subsubsection">
689 Notes
690</div>
691
692<div class="doc_text">
Misha Brukman500bc302003-11-22 00:38:41 +0000693<ul>
694
Chris Lattnerd09c4ec2007-05-17 22:02:24 +0000695<li><p>"long double" is silently transformed by the front-end into "double". There
696is no support for floating point data types of any size other than 32 and 64
697bits.</p></li>
Misha Brukman500bc302003-11-22 00:38:41 +0000698
Chris Lattnerd09c4ec2007-05-17 22:02:24 +0000699<li><p>llvm-gcc does <b>not</b> support <tt>__builtin_apply</tt> yet.
700 See <a href="http://gcc.gnu.org/onlinedocs/gcc/Constructing-Calls.html#Constructing%20Calls">Constructing Calls</a>: Dispatching a call to another function.</p>
701</li>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000702
Chris Lattnerd09c4ec2007-05-17 22:02:24 +0000703<li><p>llvm-gcc <b>partially</b> supports tthese GCC extensions:</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000704 <ol>
Chris Lattnerd09c4ec2007-05-17 22:02:24 +0000705 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html#Nested%20Functions">Nested Functions</a>: As in Algol and Pascal, lexical scoping of functions.<br>
706 Nested functions are supported, but llvm-gcc does not support non-local
707 gotos or taking the address of a nested function.</li>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000708
709 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#Function%20Attributes">Function Attributes</a>:
Misha Brukman500bc302003-11-22 00:38:41 +0000710
John Criswelld000e1d2003-12-18 16:43:17 +0000711 Declaring that functions have no side effects or that they can never
Misha Brukman500bc302003-11-22 00:38:41 +0000712 return.<br>
713
Chris Lattnerd09c4ec2007-05-17 22:02:24 +0000714 <b>Supported:</b> <tt>alias</tt>, <tt>always_inline</tt>, <tt>cdecl</tt>,
715 <tt>constructor</tt>, <tt>destructor</tt>,
Anton Korobeynikov9413de32006-11-18 08:04:48 +0000716 <tt>deprecated</tt>, <tt>fastcall</tt>, <tt>format</tt>,
Anton Korobeynikov9ec81372007-05-10 08:26:24 +0000717 <tt>format_arg</tt>, <tt>non_null</tt>, <tt>noreturn</tt>, <tt>regparm</tt>
Anton Korobeynikov8cea37b2007-01-23 12:35:46 +0000718 <tt>section</tt>, <tt>stdcall</tt>, <tt>unused</tt>, <tt>used</tt>,
719 <tt>visibility</tt>, <tt>warn_unused_result</tt>, <tt>weak</tt><br>
Misha Brukman500bc302003-11-22 00:38:41 +0000720
Chris Lattnerd09c4ec2007-05-17 22:02:24 +0000721 <b>Ignored:</b> <tt>noinline</tt>, <tt>pure</tt>, <tt>const</tt>, <tt>nothrow</tt>,
722 <tt>malloc</tt>, <tt>no_instrument_function</tt></li>
Misha Brukman500bc302003-11-22 00:38:41 +0000723 </ol>
Chris Lattnerd09c4ec2007-05-17 22:02:24 +0000724</li>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000725
Chris Lattnerd09c4ec2007-05-17 22:02:24 +0000726<li><p>llvm-gcc supports the vast majority of GCC extensions, including:</p>
Misha Brukman500bc302003-11-22 00:38:41 +0000727
Chris Lattner79c3fe12003-10-02 04:57:28 +0000728 <ol>
Chris Lattnerd09c4ec2007-05-17 22:02:24 +0000729 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Pragmas.html#Pragmas">Pragmas</a>: Pragmas accepted by GCC.</li>
730 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Local-Labels.html#Local%20Labels">Local Labels</a>: Labels local to a block.</li>
731 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#Other%20Builtins">Other Builtins</a>:
732 Other built-in functions.</li>
733 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Variable-Attributes.html#Variable%20Attributes">Variable Attributes</a>:
734 Specifying attributes of variables.</li>
735 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Type-Attributes.html#Type%20Attributes">Type Attributes</a>: Specifying attributes of types.</li>
736 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Thread_002dLocal.html">Thread-Local</a>: Per-thread variables.</li>
737 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html#Variable%20Length">Variable Length</a>:
738 Arrays whose length is computed at run time.</li>
Chris Lattner7fe97dd2004-03-16 08:54:07 +0000739 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html#Labels%20as%20Values">Labels as Values</a>: Getting pointers to labels and computed gotos.</li>
Misha Brukman500bc302003-11-22 00:38:41 +0000740 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html#Statement%20Exprs">Statement Exprs</a>: Putting statements and declarations inside expressions.</li>
741 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Typeof.html#Typeof">Typeof</a>: <code>typeof</code>: referring to the type of an expression.</li>
Tanya Lattnerca26c3e2004-06-22 03:48:17 +0000742 <li><a href="http://gcc.gnu.org/onlinedocs/gcc-3.4.0/gcc/Lvalues.html#Lvalues">Lvalues</a>: Using <code>?:</code>, "<code>,</code>" and casts in lvalues.</li>
Misha Brukman500bc302003-11-22 00:38:41 +0000743 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Conditionals.html#Conditionals">Conditionals</a>: Omitting the middle operand of a <code>?:</code> expression.</li>
744 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Long-Long.html#Long%20Long">Long Long</a>: Double-word integers.</li>
745 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Complex.html#Complex">Complex</a>: Data types for complex numbers.</li>
746 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Hex-Floats.html#Hex%20Floats">Hex Floats</a>:Hexadecimal floating-point constants.</li>
747 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html#Zero%20Length">Zero Length</a>: Zero-length arrays.</li>
748 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Empty-Structures.html#Empty%20Structures">Empty Structures</a>: Structures with no members.</li>
749 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Variadic-Macros.html#Variadic%20Macros">Variadic Macros</a>: Macros with a variable number of arguments.</li>
750 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Escaped-Newlines.html#Escaped%20Newlines">Escaped Newlines</a>: Slightly looser rules for escaped newlines.</li>
Chris Lattner26299222006-11-18 07:51:14 +0000751 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#Extended%20Asm">Extended Asm</a>: Assembler instructions with C expressions as operands.</li>
752 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Constraints.html#Constraints">Constraints</a>: Constraints for asm operands.</li>
753 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Asm-Labels.html#Asm%20Labels">Asm Labels</a>: Specifying the assembler name to use for a C symbol.</li>
754 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Explicit-Reg-Vars.html#Explicit%20Reg%20Vars">Explicit Reg Vars</a>: Defining variables residing in specified registers.</li>
755 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Vector-Extensions.html#Vector%20Extensions">Vector Extensions</a>: Using vector instructions through built-in functions.</li>
756 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Target-Builtins.html#Target%20Builtins">Target Builtins</a>: Built-in functions specific to particular targets.</li>
Misha Brukman500bc302003-11-22 00:38:41 +0000757 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Subscripting.html#Subscripting">Subscripting</a>: Any array can be subscripted, even if not an lvalue.</li>
Misha Brukmanc4b7bee2003-12-12 04:37:31 +0000758 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Pointer-Arith.html#Pointer%20Arith">Pointer Arith</a>: Arithmetic on <code>void</code>-pointers and function pointers.</li>
Misha Brukman500bc302003-11-22 00:38:41 +0000759 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Initializers.html#Initializers">Initializers</a>: Non-constant initializers.</li>
John Criswelld000e1d2003-12-18 16:43:17 +0000760 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Compound-Literals.html#Compound%20Literals">Compound Literals</a>: Compound literals give structures, unions,
761or arrays as values.</li>
Misha Brukman500bc302003-11-22 00:38:41 +0000762 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html#Designated%20Inits">Designated Inits</a>: Labeling elements of initializers.</li>
Misha Brukmanc4b7bee2003-12-12 04:37:31 +0000763 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Cast-to-Union.html#Cast%20to%20Union">Cast to Union</a>: Casting to union type from any member of the union.</li>
Misha Brukman500bc302003-11-22 00:38:41 +0000764 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Case-Ranges.html#Case%20Ranges">Case Ranges</a>: `case 1 ... 9' and such.</li>
765 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Mixed-Declarations.html#Mixed%20Declarations">Mixed Declarations</a>: Mixing declarations and code.</li>
766 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Function-Prototypes.html#Function%20Prototypes">Function Prototypes</a>: Prototype declarations and old-style definitions.</li>
Tanya Lattner78537e42004-12-08 18:29:38 +0000767 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Comments.html#C_002b_002b-Comments">C++ Comments</a>: C++ comments are recognized.</li>
Misha Brukman500bc302003-11-22 00:38:41 +0000768 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Dollar-Signs.html#Dollar%20Signs">Dollar Signs</a>: Dollar sign is allowed in identifiers.</li>
769 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Character-Escapes.html#Character%20Escapes">Character Escapes</a>: <code>\e</code> stands for the character &lt;ESC&gt;.</li>
770 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Alignment.html#Alignment">Alignment</a>: Inquiring about the alignment of a type or variable.</li>
771 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Inline.html#Inline">Inline</a>: Defining inline functions (as fast as macros).</li>
772 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Alternate-Keywords.html#Alternate%20Keywords">Alternate Keywords</a>:<code>__const__</code>, <code>__asm__</code>, etc., for header files.</li>
773 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Incomplete-Enums.html#Incomplete%20Enums">Incomplete Enums</a>: <code>enum foo;</code>, with details to follow.</li>
774 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Function-Names.html#Function%20Names">Function Names</a>: Printable strings which are the name of the current function.</li>
Chris Lattner25795bc2004-02-14 04:08:29 +0000775 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Return-Address.html#Return%20Address">Return Address</a>: Getting the return or frame address of a function.</li>
Misha Brukman500bc302003-11-22 00:38:41 +0000776 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Unnamed-Fields.html#Unnamed%20Fields">Unnamed Fields</a>: Unnamed struct/union fields within structs/unions.</li>
777 <li><a href="http://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html#Attribute%20Syntax">Attribute Syntax</a>: Formal syntax for attributes.</li>
Misha Brukmane0c891c2003-11-22 01:00:11 +0000778 </ol></li>
779
780</ul>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000781
Misha Brukman500bc302003-11-22 00:38:41 +0000782<p>If you run into GCC extensions which have not been included in any of these
783lists, please let us know (also including whether or not they work).</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000784
Misha Brukman500bc302003-11-22 00:38:41 +0000785</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000786
Misha Brukman500bc302003-11-22 00:38:41 +0000787<!-- ======================================================================= -->
788<div class="doc_subsection">
789 <a name="c++-fe">Known problems with the C++ front-end</a>
790</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000791
Misha Brukman500bc302003-11-22 00:38:41 +0000792<div class="doc_text">
793
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000794<p>The C++ front-end is considered to be fully
Chris Lattner7506b1d2004-12-07 08:04:13 +0000795tested and works for a number of non-trivial programs, including LLVM
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000796itself, Qt, Mozilla, etc.</p>
Misha Brukman500bc302003-11-22 00:38:41 +0000797
Misha Brukman500bc302003-11-22 00:38:41 +0000798<ul>
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000799<li>llvm-gcc4 only has partial support for <a href="http://llvm.org/PR870">C++
800Exception Handling</a>, and it is not enabled by default.</li>
801
802<!-- NO EH Support!
Chris Lattnere01fcfb2003-10-27 18:30:37 +0000803
Chris Lattner79c3fe12003-10-02 04:57:28 +0000804<li>Destructors for local objects are not always run when a <tt>longjmp</tt> is
Chris Lattner19092612003-10-02 16:38:05 +0000805 performed. In particular, destructors for objects in the <tt>longjmp</tt>ing
Chris Lattner79c3fe12003-10-02 04:57:28 +0000806 function and in the <tt>setjmp</tt> receiver function may not be run.
John Criswelld000e1d2003-12-18 16:43:17 +0000807 Objects in intervening stack frames will be destroyed, however (which is
Misha Brukman500bc302003-11-22 00:38:41 +0000808 better than most compilers).</li>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000809
Chris Lattner19092612003-10-02 16:38:05 +0000810<li>The LLVM C++ front-end follows the <a
811 href="http://www.codesourcery.com/cxx-abi">Itanium C++ ABI</a>.
812 This document, which is not Itanium specific, specifies a standard for name
813 mangling, class layout, v-table layout, RTTI formats, and other C++
814 representation issues. Because we use this API, code generated by the LLVM
815 compilers should be binary compatible with machine code generated by other
816 Itanium ABI C++ compilers (such as G++, the Intel and HP compilers, etc).
Chris Lattner26299222006-11-18 07:51:14 +0000817 <i>However</i>, the exception handling mechanism used by llvm-gcc3 is very
Chris Lattner19092612003-10-02 16:38:05 +0000818 different from the model used in the Itanium ABI, so <b>exceptions will not
Misha Brukman500bc302003-11-22 00:38:41 +0000819 interact correctly</b>. </li>
Chris Lattnerf3e5bc62007-05-14 06:56:09 +0000820-->
Misha Brukman500bc302003-11-22 00:38:41 +0000821</ul>
Chris Lattnerfcc54b32003-10-07 22:14:37 +0000822
Misha Brukman500bc302003-11-22 00:38:41 +0000823</div>
824
Misha Brukman500bc302003-11-22 00:38:41 +0000825
Chris Lattner98a493c2005-05-15 16:01:20 +0000826
Chris Lattner79c3fe12003-10-02 04:57:28 +0000827<!-- *********************************************************************** -->
Misha Brukman500bc302003-11-22 00:38:41 +0000828<div class="doc_section">
829 <a name="additionalinfo">Additional Information</a>
830</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000831<!-- *********************************************************************** -->
832
Misha Brukman500bc302003-11-22 00:38:41 +0000833<div class="doc_text">
834
Chris Lattner416db102005-05-16 17:13:10 +0000835<p>A wide variety of additional information is available on the <a
Chris Lattnerb4b0ce72007-05-18 00:44:29 +0000836href="http://llvm.org">LLVM web page</a>, in particular in the <a
837href="http://llvm.org/docs/">documentation</a> section. The web page also
838contains versions of the API documentation which is up-to-date with the CVS
839version of the source code.
Misha Brukman109d9e82005-03-30 19:14:24 +0000840You can access versions of these documents specific to this release by going
841into the "<tt>llvm/doc/</tt>" directory in the LLVM tree.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000842
Misha Brukman500bc302003-11-22 00:38:41 +0000843<p>If you have any questions or comments about LLVM, please feel free to contact
Chris Lattnerc463b272005-10-29 07:07:09 +0000844us via the <a href="http://llvm.org/docs/#maillist"> mailing
Chris Lattner5eccca42003-12-12 21:22:16 +0000845lists</a>.</p>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000846
Misha Brukman500bc302003-11-22 00:38:41 +0000847</div>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000848
849<!-- *********************************************************************** -->
Chris Lattner79c3fe12003-10-02 04:57:28 +0000850
Misha Brukman500bc302003-11-22 00:38:41 +0000851<hr>
Misha Brukman2061e892003-11-22 01:23:39 +0000852<address>
Misha Brukman38847d52003-12-21 22:53:21 +0000853 <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
Misha Brukman2061e892003-11-22 01:23:39 +0000854 src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
855 <a href="http://validator.w3.org/check/referer"><img
856 src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /></a>
857
Chris Lattnerb4b0ce72007-05-18 00:44:29 +0000858 <a href="http://llvm.org/">LLVM Compiler Infrastructure</a><br>
Misha Brukman500bc302003-11-22 00:38:41 +0000859 Last modified: $Date$
Misha Brukman2061e892003-11-22 01:23:39 +0000860</address>
Chris Lattner79c3fe12003-10-02 04:57:28 +0000861
Misha Brukman500bc302003-11-22 00:38:41 +0000862</body>
863</html>