blob: 2573dc8821305b201f0d677dea7153f37c55bd18 [file] [log] [blame]
Misha Brukman80731b92003-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 Spencere4190fa2004-11-18 18:38:58 +00005 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Misha Brukman80731b92003-11-22 00:38:41 +00006 <link rel="stylesheet" href="llvm.css" type="text/css">
Dan Gohman62af9d22010-05-03 23:51:05 +00007 <title>LLVM 2.8 Release Notes</title>
Misha Brukman80731b92003-11-22 00:38:41 +00008</head>
9<body>
Chris Lattner3d482502003-10-02 04:57:28 +000010
Dan Gohman62af9d22010-05-03 23:51:05 +000011<div class="doc_title">LLVM 2.8 Release Notes</div>
Mikhail Glushenkov024f7cf2008-10-13 02:08:34 +000012
Chris Lattnerc871bac2010-03-17 04:02:39 +000013<img align=right src="http://llvm.org/img/DragonSmall.png"
Gabor Greif27b166352010-04-22 10:21:43 +000014 width="136" height="136" alt="LLVM Dragon Logo">
Chris Lattnerc871bac2010-03-17 04:02:39 +000015
Chris Lattner3d482502003-10-02 04:57:28 +000016<ol>
Misha Brukman80731b92003-11-22 00:38:41 +000017 <li><a href="#intro">Introduction</a></li>
Chris Lattnerf5cd9862008-10-13 18:01:01 +000018 <li><a href="#subproj">Sub-project Status Update</a></li>
Dan Gohman62af9d22010-05-03 23:51:05 +000019 <li><a href="#externalproj">External Projects Using LLVM 2.8</a></li>
20 <li><a href="#whatsnew">What's New in LLVM 2.8?</a></li>
Chris Lattner77a51732004-04-30 22:17:12 +000021 <li><a href="GettingStarted.html">Installation Instructions</a></li>
Dan Gohmanad888912008-10-14 16:23:02 +000022 <li><a href="#knownproblems">Known Problems</a></li>
Misha Brukman80731b92003-11-22 00:38:41 +000023 <li><a href="#additionalinfo">Additional Information</a></li>
Chris Lattner3d482502003-10-02 04:57:28 +000024</ol>
25
Chris Lattner020e1fc2004-05-23 21:07:27 +000026<div class="doc_author">
Dan Gohmanad888912008-10-14 16:23:02 +000027 <p>Written by the <a href="http://llvm.org">LLVM Team</a></p>
Misha Brukman80731b92003-11-22 00:38:41 +000028</div>
Chris Lattner3d482502003-10-02 04:57:28 +000029
Chris Lattner342f9572010-09-29 05:30:03 +000030<!--
Chris Lattner656db162010-04-22 05:41:35 +000031<h1 style="color:red">These are in-progress notes for the upcoming LLVM 2.8
Jeffrey Yasskin0830b972010-01-28 01:14:43 +000032release.<br>
33You may prefer the
Dan Gohman62af9d22010-05-03 23:51:05 +000034<a href="http://llvm.org/releases/2.7/docs/ReleaseNotes.html">LLVM 2.7
35Release Notes</a>.</h1>
Chris Lattner342f9572010-09-29 05:30:03 +000036-->
Jeffrey Yasskin0830b972010-01-28 01:14:43 +000037
Chris Lattner3d482502003-10-02 04:57:28 +000038<!-- *********************************************************************** -->
Misha Brukman80731b92003-11-22 00:38:41 +000039<div class="doc_section">
40 <a name="intro">Introduction</a>
41</div>
Chris Lattner3d482502003-10-02 04:57:28 +000042<!-- *********************************************************************** -->
43
Misha Brukman80731b92003-11-22 00:38:41 +000044<div class="doc_text">
45
Chris Lattner1e4d5bc2008-10-13 17:57:36 +000046<p>This document contains the release notes for the LLVM Compiler
Dan Gohman3b763f42010-05-03 23:52:21 +000047Infrastructure, release 2.8. Here we describe the status of LLVM, including
Chris Lattner1e4d5bc2008-10-13 17:57:36 +000048major improvements from the previous release and significant known problems.
Mikhail Glushenkov25422542009-03-01 18:09:47 +000049All LLVM releases may be downloaded from the <a
Chris Lattner1e4d5bc2008-10-13 17:57:36 +000050href="http://llvm.org/releases/">LLVM releases web site</a>.</p>
Chris Lattner62495762003-10-02 16:38:05 +000051
Chris Lattnerb5bb5972004-12-07 08:04:13 +000052<p>For more information about LLVM, including information about the latest
Chris Lattnera69595e2005-10-29 07:07:09 +000053release, please check out the <a href="http://llvm.org/">main LLVM
Chris Lattnere7525b52003-10-07 21:38:31 +000054web site</a>. If you have questions or comments, the <a
Chris Lattner0b1c9a52010-03-17 04:41:49 +000055href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVM Developer's
56Mailing List</a> is a good place to send them.</p>
Chris Lattner3d482502003-10-02 04:57:28 +000057
Mikhail Glushenkov024f7cf2008-10-13 02:08:34 +000058<p>Note that if you are reading this file from a Subversion checkout or the
Chris Lattner0a1fd102007-09-21 03:54:09 +000059main LLVM web page, this document applies to the <i>next</i> release, not the
Gabor Greif355f81c2008-10-14 11:00:32 +000060current one. To see the release notes for a specific release, please see the
Chris Lattner0a1fd102007-09-21 03:54:09 +000061<a href="http://llvm.org/releases/">releases page</a>.</p>
Misha Brukman80731b92003-11-22 00:38:41 +000062
63</div>
Chris Lattneraa61f412009-10-13 17:48:04 +000064
Chris Lattner3d482502003-10-02 04:57:28 +000065
Chris Lattneraa61f412009-10-13 17:48:04 +000066<!--
67Almost dead code.
68 include/llvm/Analysis/LiveValues.h => Dan
69 lib/Transforms/IPO/MergeFunctions.cpp => consider for 2.8.
70 llvm/Analysis/PointerTracking.h => Edwin wants this, consider for 2.8.
Chris Lattner13ee7952010-08-28 04:09:24 +000071 GEPSplitterPass
Chris Lattneraa61f412009-10-13 17:48:04 +000072-->
73
74
Chris Lattner342f9572010-09-29 05:30:03 +000075<!-- Features that need text if they're finished for 2.9:
Chris Lattnera67df2d2010-04-22 06:28:20 +000076 combiner-aa?
Chris Lattneraa61f412009-10-13 17:48:04 +000077 strong phi elim
Chris Lattneraa61f412009-10-13 17:48:04 +000078 loop dependence analysis
Chris Lattnerbd244042010-08-28 16:33:36 +000079 TBAA
Chris Lattner342f9572010-09-29 05:30:03 +000080 CorrelatedValuePropagation
Chris Lattner2b8a52e2008-02-10 07:46:44 +000081 -->
Chris Lattner342f9572010-09-29 05:30:03 +000082
83 <!-- Announcement, lldb, libc++ -->
Chris Lattner16be34d2010-09-29 07:25:03 +000084
85 <!-- to write:
86 MachineCSE tuned and on by default.
87 llvm.dbg.value: variable debug info for optimized code
88 MC Assembler backend is now real, does relaxation and is bitwise identical
89 with darwin assembler in huge majority of all cases.
90 new GHC calling convention
91 New half float intrinsics LangRef.html#int_fp16
92 Rewrote tblgen's type inference for backends to be more consistent and
93 diagnose more target bugs. This also allows limited support for writing
94 patterns for instructions that return multiple results, e.g. a virtual
95 register and a flag result. Stuff that used 'parallel' before should use
96 this.
97 New ARM/Thumb disassembler support in MC.
98 New SSEDomainFix pass:
99 On Nehalem and newer CPUs there is a 2 cycle latency penalty on using a
100 register in a different domain than where it was defined. Some instructions
101 have equvivalents for different domains, like por/orps/orpd. The
102 SSEDomainFix pass tries to minimize the number of domain crossings by
103 changing between equvivalent opcodes where possible.
104 Support for the Intel AES instructions in the assembler.
105 memcpy, memmove, and memset now take address space qualified pointers + volatile.
Chris Lattnerf25bc192010-09-30 16:31:33 +0000106 per-instruction debug info metadata is much faster and uses less space (new DebugLoc class).
107 -ffunction-sections and -fdata-sections are supported on ELF targets.
108 Now iterate function passes when a cgsccpassmanager detects a devirtualization
109 -momit-leaf-frame-pointer now supported.
110 New -regalloc=fast, =local got removed
111 New -regalloc=default option that chooses a register allocator based on the -O optimization level.
112 New "trap values" concept: http://llvm.org/docs/LangRef.html#trapvalues
113 Improved trip count analysis for <= and >= loops, and uses sign overflow info.
114 REMOVED: SCCVN pass.
115 X86 backend attempts to promote 16-bit integer operations to 32-bits to avoid
116 0x66 prefixes, which are slow on some microarchitectures and bloat the code
117 on others.
118 X87 fp stackifier is global!
119 LTO debug info support?
120 NEON: Better performance for QQQQ (4-consecutive Q register) instructions. New reg sequence abstraction?
121 New support for X86 "thiscall" calling convention (x86_thiscallcc in IR).
122 ARM: Better scheduling (list-hybrid, hybrid?)
123 New SubRegIndex tblgen class for targets -> jakob
124 ARM: Tail call support.
125 AVX support in the MC assembler. Full compiler support not done yet.
126 Atomics now get legalized when not natively supported (jim g)
127 ARM: General performance work and tuning.
Chris Lattner97eac672010-10-02 19:32:01 +0000128 Bottom up fast isel. Simple Load reuse. No more machinedce. Load folding at -O0?
129 New linker_private_weak and linker_private_weak_def_auto linkage types
130 compiler_rt softfloat support.
131 X86 ABI: <2 x float> in IR no longer maps onto MMX, it turns into <4 x float>
132 IR ABI: <3 x float> is passed as <4 x float> instead of 3 floats.
133 renamed "Release" -> "Release+Asserts"; "Release-Asserts" -> "Release etc.
134 New COPY instruction. copyRegToReg -> copyPhysReg, isMoveInstr is gone.
135 JumpThreading much more aggressive about implied value relations.
136 New RegionInfo pass "opt -regions analyze" or "opt -view-regions".
137 mc assembler supports macros.
138 RenderMachineFunction: -rendermf
139 SplitKit?
140 Evan: Teach bottom up pre-ra scheduler to track register pressure. Work in progress.
141 Evan: Add an ILP scheduler. On x86_64, this is a win for all tests in CFP2000. It also sped up 256.bzip2 by 16%.
142 RegisterPass<> -> INTIALIZE_PASS()
143 llvm-diff?
144 Preliminary work on TBAA but not usable in 2.8.
145 Atomic lowering patch: -loweratomic (see Passes.html#loweratomic)
146 compiler_rt now includes extensive a fairly testsuite for blocks language feature and the blocks runtime.
147 New OptimizeExts+OptimizeCmps -> PeepholeOptimizer pass
148 Triples are now stored in normalized form. Triple::normalize.
149 New LocalStackSlotAllocation.cpp pass (jimg)
150 New llvm.x86.int intrinsic (for int $42 and int3)
151 New CorrelatedValuePropagation pass, not on by default in 2.8 yet.
152 Verbose assembly decodes X86 shuffle instructions, e.g.:
153 insertps $113, %xmm3, %xmm0 ## xmm0 = zero,xmm0[1,2],xmm3[1]
154 unpcklps %xmm1, %xmm0 ## xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
155 pshufd $1, %xmm1, %xmm1 ## xmm1 = xmm1[1,0,0,0]
Chris Lattner16be34d2010-09-29 07:25:03 +0000156 -->
157
Chris Lattner2b8a52e2008-02-10 07:46:44 +0000158
Chris Lattnerf5cd9862008-10-13 18:01:01 +0000159<!-- *********************************************************************** -->
160<div class="doc_section">
161 <a name="subproj">Sub-project Status Update</a>
Chris Lattner625a3d82008-06-08 21:34:41 +0000162</div>
Chris Lattnerf5cd9862008-10-13 18:01:01 +0000163<!-- *********************************************************************** -->
Chris Lattner625a3d82008-06-08 21:34:41 +0000164
165<div class="doc_text">
Chris Lattnerc75fd522008-06-08 21:58:17 +0000166<p>
Dan Gohman62af9d22010-05-03 23:51:05 +0000167The LLVM 2.8 distribution currently consists of code from the core LLVM
Chris Lattneraa61f412009-10-13 17:48:04 +0000168repository (which roughly includes the LLVM optimizers, code generators
169and supporting tools), the Clang repository and the llvm-gcc repository. In
170addition to this code, the LLVM Project includes other sub-projects that are in
171development. Here we include updates on these subprojects.
Bill Wendlingf170d2e2009-03-02 04:28:57 +0000172</p>
Chris Lattnerf5cd9862008-10-13 18:01:01 +0000173
Chris Lattnerc75fd522008-06-08 21:58:17 +0000174</div>
175
Chris Lattnerf5cd9862008-10-13 18:01:01 +0000176
Chris Lattnerc75fd522008-06-08 21:58:17 +0000177<!--=========================================================================-->
Chris Lattnerf5cd9862008-10-13 18:01:01 +0000178<div class="doc_subsection">
Chris Lattner44c09cd2008-10-13 18:11:54 +0000179<a name="clang">Clang: C/C++/Objective-C Frontend Toolkit</a>
Chris Lattnerc75fd522008-06-08 21:58:17 +0000180</div>
181
182<div class="doc_text">
183
Chris Lattner5de7f6e2010-04-26 17:42:18 +0000184<p><a href="http://clang.llvm.org/">Clang</a> is an LLVM front end for the C,
185C++, and Objective-C languages. Clang aims to provide a better user experience
186through expressive diagnostics, a high level of conformance to language
187standards, fast compilation, and low memory use. Like LLVM, Clang provides a
188modular, library-based architecture that makes it suitable for creating or
189integrating with other development tools. Clang is considered a
Chris Lattner342f9572010-09-29 05:30:03 +0000190production-quality compiler for C, Objective-C, C++ and Objective-C++ on x86
191(32- and 64-bit), and for darwin-arm targets.</p>
Chris Lattneraa61f412009-10-13 17:48:04 +0000192
Chris Lattnerb3fa6bf2010-07-21 15:57:40 +0000193<p>In the LLVM 2.8 time-frame, the Clang team has made many improvements:</p>
Bill Wendlingef362462008-10-27 09:27:33 +0000194
Daniel Dunbarc11b40f2008-10-14 23:25:09 +0000195<ul>
Chris Lattner342f9572010-09-29 05:30:03 +0000196<li>Surely these guys have done something</li>
Chris Lattnerf25bc192010-09-30 16:31:33 +0000197<li>X86-64 abi improvements? Did they make it in?</li>
Bill Wendling87adbe42009-03-02 04:28:18 +0000198</ul>
Chris Lattner44c09cd2008-10-13 18:11:54 +0000199</div>
200
201<!--=========================================================================-->
202<div class="doc_subsection">
203<a name="clangsa">Clang Static Analyzer</a>
204</div>
205
206<div class="doc_text">
207
Chris Lattner2284b6a2010-04-22 06:38:11 +0000208<p>The <a href="http://clang-analyzer.llvm.org/">Clang Static Analyzer</a>
209 project is an effort to use static source code analysis techniques to
210 automatically find bugs in C and Objective-C programs (and hopefully <a
211 href="http://clang-analyzer.llvm.org/dev_cxx.html">C++ in the
212 future</a>!). The tool is very good at finding bugs that occur on specific
213 paths through code, such as on error conditions.</p>
Chris Lattnerbcffa5a2008-10-14 00:52:49 +0000214
Chris Lattner3458ab62010-09-30 00:34:43 +0000215<p>The LLVM 2.8 release fixes a number of bugs and slightly improves precision
216 over 2.7, but there are no major new features in the release.
Chris Lattner2284b6a2010-04-22 06:38:11 +0000217</p>
Chris Lattnerc75fd522008-06-08 21:58:17 +0000218
219</div>
220
Chris Lattnerf5cd9862008-10-13 18:01:01 +0000221<!--=========================================================================-->
222<div class="doc_subsection">
Nicolas Geoffraye5ec9322008-10-14 19:23:04 +0000223<a name="vmkit">VMKit: JVM/CLI Virtual Machine Implementation</a>
Chris Lattnerf5cd9862008-10-13 18:01:01 +0000224</div>
225
226<div class="doc_text">
227<p>
Nicolas Geoffraye5ec9322008-10-14 19:23:04 +0000228The <a href="http://vmkit.llvm.org/">VMKit project</a> is an implementation of
Chris Lattneraa61f412009-10-13 17:48:04 +0000229a JVM and a CLI Virtual Machine (Microsoft .NET is an
230implementation of the CLI) using LLVM for static and just-in-time
231compilation.</p>
Chris Lattnerf5cd9862008-10-13 18:01:01 +0000232
Chris Lattnerb3fa6bf2010-07-21 15:57:40 +0000233<p>With the release of LLVM 2.8, ...</p>
Chris Lattnerf5cd9862008-10-13 18:01:01 +0000234
235</div>
236
Chris Lattneraa61f412009-10-13 17:48:04 +0000237
238<!--=========================================================================-->
239<div class="doc_subsection">
240<a name="compiler-rt">compiler-rt: Compiler Runtime Library</a>
241</div>
242
243<div class="doc_text">
244<p>
245The new LLVM <a href="http://compiler-rt.llvm.org/">compiler-rt project</a>
246is a simple library that provides an implementation of the low-level
247target-specific hooks required by code generation and other runtime components.
248For example, when compiling for a 32-bit target, converting a double to a 64-bit
249unsigned integer is compiled into a runtime call to the "__fixunsdfdi"
250function. The compiler-rt library provides highly optimized implementations of
251this and other low-level routines (some are 3x faster than the equivalent
252libgcc routines).</p>
253
254<p>
255All of the code in the compiler-rt project is available under the standard LLVM
Chris Lattnerb3fa6bf2010-07-21 15:57:40 +0000256License, a "BSD-style" license. New in LLVM 2.8:
257
258Soft float support
259</p>
Chris Lattneraa61f412009-10-13 17:48:04 +0000260
261</div>
262
263<!--=========================================================================-->
264<div class="doc_subsection">
Duncan Sands92452b92010-04-02 09:23:15 +0000265<a name="dragonegg">DragonEgg: llvm-gcc ported to gcc-4.5</a>
Chris Lattneraa61f412009-10-13 17:48:04 +0000266</div>
267
268<div class="doc_text">
269<p>
Duncan Sands92452b92010-04-02 09:23:15 +0000270<a href="http://dragonegg.llvm.org/">DragonEgg</a> is a port of llvm-gcc to
Duncan Sands7f9a0dc2010-09-30 17:37:34 +0000271gcc-4.5. Unlike llvm-gcc, dragonegg in theory does not require any gcc-4.5
272modifications whatsoever (currently one small patch is needed) thanks to the
273new <a href="http://gcc.gnu.org/wiki/plugins">gcc plugin architecture</a>.
274DragonEgg is a gcc plugin that makes gcc-4.5 use the LLVM optimizers and code
275generators instead of gcc's, just like with llvm-gcc.
Duncan Sands92452b92010-04-02 09:23:15 +0000276</p>
277
278<p>
Duncan Sands7f9a0dc2010-09-30 17:37:34 +0000279DragonEgg is still a work in progress, but it is able to compile a lot of code,
280for example all of gcc, LLVM and clang. Currently Ada, C, C++ and Fortran work
281well, while all other languages either don't work at all or only work poorly.
282For the moment only the x86-32 and x86-64 targets are supported, and only on
283linux and darwin (darwin may need additional gcc patches).
Duncan Sands92452b92010-04-02 09:23:15 +0000284</p>
285
286<p>
Duncan Sands7f9a0dc2010-09-30 17:37:34 +0000287The 2.8 release has the following notable changes:
288<ul>
289<li>The plugin loads faster due to exporting fewer symbols.</li>
290<li>Additional vector operations such as addps256 are now supported.</li>
291<li>Ada global variables with no initial value are no longer zero initialized,
292resulting in better optimization.</li>
293<li>The '-fplugin-arg-dragonegg-enable-gcc-optzns' flag now runs all gcc
294optimizers, rather than just a handful.</li>
295<li>Fortran programs using common variables now link correctly.</li>
296<li>GNU OMP constructs no longer crash the compiler.</li>
297</ul>
Chris Lattneraa61f412009-10-13 17:48:04 +0000298</p>
299
300</div>
301
302
303<!--=========================================================================-->
304<div class="doc_subsection">
Chris Lattner342f9572010-09-29 05:30:03 +0000305<a name="lldb">LLDB: Low Level Debugger</a>
306</div>
307
308<div class="doc_text">
309<p>
310<a href="http://lldb.llvm.org/">LLDB</a> is</p>
311
312<p>
313</p>
314
315<p>
3162.8 status here.
317</p>
318
319</div>
320
321<!--=========================================================================-->
322<div class="doc_subsection">
323<a name="libc++">libc++: C++ Standard Library</a>
324</div>
325
326<div class="doc_text">
327<p>
328<a href="http://libc++.llvm.org/">libc++</a> is</p>
329
330<p>
331</p>
332
333<p>
3342.8 status here.
335</p>
336
337</div>
338
Chris Lattneraa61f412009-10-13 17:48:04 +0000339
Chris Lattner53e06f92009-02-26 22:33:38 +0000340<!-- *********************************************************************** -->
341<div class="doc_section">
Chris Lattnerb3fa6bf2010-07-21 15:57:40 +0000342 <a name="externalproj">External Open Source Projects Using LLVM 2.8</a>
Chris Lattner53e06f92009-02-26 22:33:38 +0000343</div>
344<!-- *********************************************************************** -->
345
Chris Lattneraa61f412009-10-13 17:48:04 +0000346<div class="doc_text">
347
348<p>An exciting aspect of LLVM is that it is used as an enabling technology for
349 a lot of other language and tools projects. This section lists some of the
Chris Lattnerb3fa6bf2010-07-21 15:57:40 +0000350 projects that have already been updated to work with LLVM 2.8.</p>
Chris Lattnerdf85c892010-04-26 17:38:10 +0000351</div>
352
Chris Lattner3458ab62010-09-30 00:34:43 +0000353<!--=========================================================================-->
354<div class="doc_subsection">
355<a name="tce">TTA-based Codesign Environment (TCE)</a>
356</div>
357
358<div class="doc_text">
359<p>
360<a href="http://tce.cs.tut.fi/">TCE</a> is a toolset for designing
361application-specific processors (ASP) based on the Transport triggered
362architecture (TTA). The toolset provides a complete co-design flow from C/C++
363programs down to synthesizable VHDL and parallel program binaries. Processor
364customization points include the register files, function units, supported
365operations, and the interconnection network.</p>
366
367<p>TCE uses llvm-gcc/Clang and LLVM for C/C++ language support, target
368independent optimizations and also for parts of code generation. It generates
369new LLVM-based code generators "on the fly" for the designed TTA processors and
370loads them in to the compiler backend as runtime libraries to avoid per-target
371recompilation of larger parts of the compiler chain.</p>
372
373</div>
374
375<!--=========================================================================-->
376<div class="doc_subsection">
377<a name="Horizon">Horizon Bytecode Compiler</a>
378</div>
379
380<div class="doc_text">
381<p>
382<a href="http://www.quokforge.org/projects/horizon">Horizon</a> is a bytecode
383language and compiler written on top of LLVM, intended for producing
384single-address-space managed code operating systems that
385run faster than the equivalent multiple-address-space C systems.
386More in-depth blurb is available on <a
387href="http://www.quokforge.org/projects/horizon/wiki/Wiki">the wiki</a>.</p>
388
389</div>
390
391<!--=========================================================================-->
392<div class="doc_subsection">
393<a name="clamav">Clam AntiVirus</a>
394</div>
395
396<div class="doc_text">
397<p>
398<a href=http://www.clamav.net>Clam AntiVirus</a> is an open source (GPL)
399anti-virus toolkit for UNIX, designed especially for e-mail scanning on mail
400gateways. Since version 0.96 it has <a
401href="http://vrt-sourcefire.blogspot.com/2010/09/introduction-to-clamavs-low-level.html">bytecode
402signatures</a> that allow writing detections for complex malware. It
403uses LLVM's JIT to speed up the execution of bytecode on
404X86,X86-64,PPC32/64, falling back to its own interpreter otherwise.
405The git version was updated to work with LLVM 2.8
406</p>
407
408<p>The <a
409href="http://git.clamav.net/gitweb?p=clamav-bytecode-compiler.git;a=blob_plain;f=docs/user/clambc-user.pdf">
410ClamAV bytecode compiler</a> uses Clang and LLVM to compile a C-like
411language, insert runtime checks, and generate ClamAV bytecode.</p>
412
413</div>
414
415<!--=========================================================================-->
416<div class="doc_subsection">
417<a name="pure">Pure</a>
418</div>
419
420<div class="doc_text">
421<p>
422<a href="http://pure-lang.googlecode.com/">Pure</a>
423is an algebraic/functional
424programming language based on term rewriting. Programs are collections
425of equations which are used to evaluate expressions in a symbolic
426fashion. Pure offers dynamic typing, eager and lazy evaluation, lexical
427closures, a hygienic macro system (also based on term rewriting),
428built-in list and matrix support (including list and matrix
429comprehensions) and an easy-to-use C interface. The interpreter uses
430LLVM as a backend to JIT-compile Pure programs to fast native code.</p>
431
432<p>Pure versions 0.44 and later have been tested and are known to work with
433LLVM 2.8 (and continue to work with older LLVM releases >= 2.5).</p>
434
435</div>
436
437<!--=========================================================================-->
438<div class="doc_subsection">
439<a name="GHC">Glasgow Haskell Compiler (GHC)</a>
440</div>
441
442<div class="doc_text">
443<p>
444<a href="http://www.haskell.org/ghc/">GHC</a> is an open source,
445state-of-the-art programming suite for
446Haskell, a standard lazy functional programming language. It includes
447an optimizing static compiler generating good code for a variety of
448platforms, together with an interactive system for convenient, quick
449development.</p>
450
451<p>In addition to the existing C and native code generators, GHC 7.0 now
452supports an <a
453href="http://hackage.haskell.org/trac/ghc/wiki/Commentary/Compiler/Backends/LLVM">LLVM
454code generator</a>. GHC supports LLVM 2.7 and later.</p>
455
456</div>
457
458<!--=========================================================================-->
459<div class="doc_subsection">
460<a name="Clay">Clay Programming Language</a>
461</div>
462
463<div class="doc_text">
464<p>
Chris Lattner510a81a2010-09-30 01:12:09 +0000465<a href="http://tachyon.in/clay/">Clay</a> is a new systems programming
Chris Lattner3458ab62010-09-30 00:34:43 +0000466language that is specifically designed for generic programming. It makes
467generic programming very concise thanks to whole program type propagation. It
468uses LLVM as its backend.</p>
469
470</div>
Chris Lattner64694df2010-04-22 21:34:16 +0000471
Chris Lattnerca7c8962010-10-01 06:34:49 +0000472<!--=========================================================================-->
473<div class="doc_subsection">
474<a name="llvm-py">llvm-py Python Bindings for LLVM</a>
475</div>
476
477<div class="doc_text">
478<p>
479<a href="http://www.mdevan.org/llvm-py/">llvm-py</a> has been updated to work
480with LLVM 2.8. llvm-py provides Python bindings for LLVM, allowing you to write a
481compiler backend or a VM in Python.</p>
482
483</div>
484
485
486
Chris Lattnerc75fd522008-06-08 21:58:17 +0000487<!-- *********************************************************************** -->
488<div class="doc_section">
Chris Lattnerb3fa6bf2010-07-21 15:57:40 +0000489 <a name="whatsnew">What's New in LLVM 2.8?</a>
Chris Lattnerc75fd522008-06-08 21:58:17 +0000490</div>
491<!-- *********************************************************************** -->
492
Chris Lattnerb7bc2aa2008-06-08 22:59:35 +0000493<div class="doc_text">
494
Chris Lattneraa61f412009-10-13 17:48:04 +0000495<p>This release includes a huge number of bug fixes, performance tweaks and
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000496minor improvements. Some of the major improvements and new features are listed
497in this section.
Chris Lattnerb7bc2aa2008-06-08 22:59:35 +0000498</p>
Chris Lattneraa61f412009-10-13 17:48:04 +0000499
Chris Lattnera67df2d2010-04-22 06:28:20 +0000500</div>
501
502<!--=========================================================================-->
503<div class="doc_subsection">
504<a name="orgchanges">LLVM Community Changes</a>
505</div>
506
507<div class="doc_text">
508
Chris Lattnerb3fa6bf2010-07-21 15:57:40 +0000509<p>In addition to changes to the code, between LLVM 2.7 and 2.8, a number of
Chris Lattner87e04952010-04-21 05:17:40 +0000510organization changes have happened:
511</p>
512
513<ul>
Chris Lattner342f9572010-09-29 05:30:03 +0000514<li>libc++ and lldb are new</li>
Chris Lattner16be34d2010-09-29 07:25:03 +0000515<li>Debugging optimized code support.</li>
Chris Lattner87e04952010-04-21 05:17:40 +0000516</ul>
Chris Lattnerb7bc2aa2008-06-08 22:59:35 +0000517</div>
518
Chris Lattnerc75fd522008-06-08 21:58:17 +0000519<!--=========================================================================-->
Chris Lattner625a3d82008-06-08 21:34:41 +0000520<div class="doc_subsection">
Chris Lattnercdc44ed2008-02-06 18:00:06 +0000521<a name="majorfeatures">Major New Features</a>
522</div>
523
524<div class="doc_text">
525
Chris Lattnerb3fa6bf2010-07-21 15:57:40 +0000526<p>LLVM 2.8 includes several major new capabilities:</p>
Chris Lattner97beb512007-05-14 06:56:09 +0000527
528<ul>
Chris Lattner8c26cee2010-09-05 20:49:45 +0000529<li>atomic lowering pass.</li>
530<li>RegionInfo pass: opt -regions analyze" or "opt -view-regions".
531<!-- Tobias Grosser --></li>
532<li>ARMGlobalMerge: <!-- Anton --> </li>
Chris Lattner8128ca12010-09-06 19:14:40 +0000533<li>llvm-diff</li>
Chris Lattner458e79f2008-02-10 08:18:42 +0000534</ul>
Chris Lattner10a3cc42010-03-17 06:41:58 +0000535
Chris Lattner97beb512007-05-14 06:56:09 +0000536</div>
537
Chris Lattner0a1fd102007-09-21 03:54:09 +0000538<!--=========================================================================-->
539<div class="doc_subsection">
Chris Lattnerd1094e02009-03-02 02:37:32 +0000540<a name="coreimprovements">LLVM IR and Core Improvements</a>
Chris Lattnerdd6acc02008-02-10 08:17:19 +0000541</div>
542
543<div class="doc_text">
Chris Lattneraa61f412009-10-13 17:48:04 +0000544<p>LLVM IR has several new features for better support of new targets and that
545expose new optimization opportunities:</p>
Chris Lattnerdd6acc02008-02-10 08:17:19 +0000546
Chris Lattnerb7112222008-06-05 06:25:56 +0000547<ul>
Gabor Greif4b17e652010-07-21 10:20:08 +0000548
549<li>LLVM 2.8 changes the internal order of operands in <a
550 href="http://llvm.org/doxygen/classllvm_1_1InvokeInst.html"><tt>InvokeInst</tt></a>
551 and <a href="http://llvm.org/doxygen/classllvm_1_1CallInst.html"><tt>CallInst</tt></a>.
552 To be portable across releases, resort to <tt>CallSite</tt> and the
Gabor Greif930894f2010-07-21 10:22:41 +0000553 high-level accessors, such as <tt>getCalledValue</tt> and <tt>setUnwindDest</tt>.
Gabor Greif4b17e652010-07-21 10:20:08 +0000554</li>
Gabor Greifed79dcb2010-07-26 18:48:07 +0000555<li>
556 You can no longer pass use_iterators directly to cast<> (and similar), because
557 these routines tend to perform costly dereference operations more than once. You
558 have to dereference the iterators yourself and pass them in.
559</li>
Torok Edwine6f478f2010-08-04 12:43:22 +0000560<li>
561 llvm.memcpy.*, llvm.memset.*, llvm.memmove.* (and possibly other?) intrinsics
562 take an extra parameter now (i1 isVolatile), totaling 5 parameters.
563 If you were creating these intrinsic calls and prototypes yourself (as opposed
564 to using Intrinsic::getDeclaration), you can use UpgradeIntrinsicFunction/UpgradeIntrinsicCall
565 to be portable accross releases.
566 Note that you cannot use Intrinsic::getDeclaration() in a backwards compatible
567 way (needs 2/3 types now, in 2.7 it needed just 1).
568</li>
569<li>
570 SetCurrentDebugLocation takes a DebugLoc now instead of a MDNode.
571 Change your code to use
572 SetCurrentDebugLocation(DebugLoc::getFromDILocation(...)).
573</li>
574<li>
575 VISIBILITY_HIDDEN is gone.
576</li>
577<li>
Owen Andersonf16eb372010-08-04 18:27:08 +0000578 The <tt>RegisterPass</tt> and <tt>RegisterAnalysisGroup</tt> templates are
579 considered deprecated, but continue to function in LLVM 2.8. Clients are
580 strongly advised to use the upcoming <tt>INITIALIZE_PASS()</tt> and
581 <tt>INITIALIZE_AG_PASS()</tt> macros instead.
582<li>
Torok Edwine6f478f2010-08-04 12:43:22 +0000583 SMDiagnostic takes different parameters now. //FIXME: how to upgrade?
584</li>
585<li>
Duncan Sands1b6744a2010-08-30 10:57:54 +0000586 The constructor for the Triple class no longer tries to understand odd triple
587 specifications. Frontends should ensure that they only pass valid triples to
588 LLVM. The Triple::normalize utility method has been added to help front-ends
589 deal with funky triples.
590<li>
Torok Edwine6f478f2010-08-04 12:43:22 +0000591 Some APIs got renamed:
592 <ul>
593 <li>llvm_report_error -&gt; report_fatal_error</li>
594 <li>llvm_install_error_handler -&gt; install_fatal_error_handler</li>
595 <li>llvm::DwarfExceptionHandling -&gt; llvm::JITExceptionHandling</li>
596 </ul>
597</li>
Chris Lattnerdd6acc02008-02-10 08:17:19 +0000598</ul>
Mikhail Glushenkov024f7cf2008-10-13 02:08:34 +0000599
Chris Lattnerdd6acc02008-02-10 08:17:19 +0000600</div>
601
602<!--=========================================================================-->
603<div class="doc_subsection">
Chris Lattner2b8a52e2008-02-10 07:46:44 +0000604<a name="optimizer">Optimizer Improvements</a>
605</div>
606
607<div class="doc_text">
608
Chris Lattneraa61f412009-10-13 17:48:04 +0000609<p>In addition to a large array of minor performance tweaks and bug fixes, this
Chris Lattner25879d72008-10-13 21:50:36 +0000610release includes a few major enhancements and additions to the optimizers:</p>
Chris Lattner2b8a52e2008-02-10 07:46:44 +0000611
612<ul>
613
Chris Lattnerb3fa6bf2010-07-21 15:57:40 +0000614<li></li>
Chris Lattnera668b452010-04-21 06:42:24 +0000615
Chris Lattneraa61f412009-10-13 17:48:04 +0000616</ul>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000617
Chris Lattneraa61f412009-10-13 17:48:04 +0000618</div>
Chris Lattnerd1094e02009-03-02 02:37:32 +0000619
Chris Lattnerd1094e02009-03-02 02:37:32 +0000620
Chris Lattneraa61f412009-10-13 17:48:04 +0000621<!--=========================================================================-->
622<div class="doc_subsection">
623<a name="executionengine">Interpreter and JIT Improvements</a>
624</div>
Chris Lattner25879d72008-10-13 21:50:36 +0000625
Chris Lattneraa61f412009-10-13 17:48:04 +0000626<div class="doc_text">
627
628<ul>
Chris Lattnerb3fa6bf2010-07-21 15:57:40 +0000629<li></li>
Chris Lattner87e04952010-04-21 05:17:40 +0000630
Chris Lattner7795ea92008-06-08 02:45:07 +0000631</ul>
632
633</div>
634
635<!--=========================================================================-->
636<div class="doc_subsection">
Chris Lattnerf25bc192010-09-30 16:31:33 +0000637<a name="mc">MC Level Improvements</a>
638</div>
639
640<div class="doc_text">
641<p>
642FIXME: Rewrite.
643
644The LLVM Machine Code (aka MC) sub-project of LLVM was created to solve a number
645of problems in the realm of assembly, disassembly, object file format handling,
646and a number of other related areas that CPU instruction-set level tools work
647in. It is a sub-project of LLVM which provides it with a number of advantages
648over other compilers that do not have tightly integrated assembly-level tools.
649For a gentle introduction, please see the <a
650href="http://blog.llvm.org/2010/04/intro-to-llvm-mc-project.html">Intro to the
651LLVM MC Project Blog Post</a>.
652</p>
653
654<p>2.8 status here. Basic correctness, some obscure missing instructions on
655 mainline, on by default in clang.
656 Entire compiler backend converted to use mcstreamer.
657 </p>
658</div>
659
660
661
662<!--=========================================================================-->
663<div class="doc_subsection">
Chris Lattnerd434bfb2009-03-02 03:24:11 +0000664<a name="codegen">Target Independent Code Generator Improvements</a>
Chris Lattner7795ea92008-06-08 02:45:07 +0000665</div>
666
667<div class="doc_text">
668
Mikhail Glushenkov25422542009-03-01 18:09:47 +0000669<p>We have put a significant amount of work into the code generator
670infrastructure, which allows us to implement more aggressive algorithms and make
671it run faster:</p>
Chris Lattner7795ea92008-06-08 02:45:07 +0000672
673<ul>
Chris Lattnerb3fa6bf2010-07-21 15:57:40 +0000674<li>MachO writer works.</li>
Chris Lattner0a1fd102007-09-21 03:54:09 +0000675</ul>
Chris Lattner0a1fd102007-09-21 03:54:09 +0000676</div>
677
Chris Lattnerd1094e02009-03-02 02:37:32 +0000678<!--=========================================================================-->
679<div class="doc_subsection">
680<a name="x86">X86-32 and X86-64 Target Improvements</a>
681</div>
682
683<div class="doc_text">
684<p>New features of the X86 target include:
685</p>
686
687<ul>
Chris Lattnerb3fa6bf2010-07-21 15:57:40 +0000688<li>The X86 backend now supports holding X87 floating point stack values
689 in registers across basic blocks, dramatically improving performance of code
690 that uses long double, and when targetting CPUs that don't support SSE.</li>
Chris Lattnerd434bfb2009-03-02 03:24:11 +0000691
Chris Lattnerd1094e02009-03-02 02:37:32 +0000692</ul>
693
Chris Lattnerd1094e02009-03-02 02:37:32 +0000694</div>
Chris Lattner0a1fd102007-09-21 03:54:09 +0000695
696<!--=========================================================================-->
697<div class="doc_subsection">
Chris Lattneraa61f412009-10-13 17:48:04 +0000698<a name="ARM">ARM Target Improvements</a>
Chris Lattnerc92d7692009-03-01 02:30:21 +0000699</div>
700
701<div class="doc_text">
Chris Lattneraa61f412009-10-13 17:48:04 +0000702<p>New features of the ARM target include:
703</p>
Chris Lattnerc92d7692009-03-01 02:30:21 +0000704
705<ul>
Chris Lattnerc92d7692009-03-01 02:30:21 +0000706
Bob Wilson46d65802010-09-13 17:37:55 +0000707<li>
708 All of the NEON load and store intrinsics (llvm.arm.neon.vld* and
709 llvm.arm.neon.vst*) take an extra parameter to specify the alignment in bytes
710 of the memory being accessed.
711</li>
712<li>
713 The llvm.arm.neon.vaba intrinsic (vector absolute difference and
714 accumulate) has been removed. This operation is now represented using
715 the llvm.arm.neon.vabd intrinsic (vector absolute difference) followed by a
716 vector add.
Bob Wilsone44f2982010-09-13 17:39:35 +0000717</li>
Bob Wilson46d65802010-09-13 17:37:55 +0000718<li>
719 The llvm.arm.neon.vabdl and llvm.arm.neon.vabal intrinsics (lengthening
720 vector absolute difference with and without accumlation) have been removed.
721 They are represented using the llvm.arm.neon.vabd intrinsic (vector absolute
722 difference) followed by a vector zero-extend operation, and for vabal,
723 a vector add.
724</li>
725<li>
726 The llvm.arm.neon.vmovn intrinsic has been removed. Calls of this intrinsic
727 are now replaced by vector truncate operations.
728</li>
729<li>
730 The llvm.arm.neon.vmovls and llvm.arm.neon.vmovlu intrinsics have been
731 removed. They are now represented as vector sign-extend (vmovls) and
732 zero-extend (vmovlu) operations.
733</li>
734<li>
735 The llvm.arm.neon.vaddl*, llvm.arm.neon.vaddw*, llvm.arm.neon.vsubl*, and
736 llvm.arm.neon.vsubw* intrinsics (lengthening vector add and subtract) have
737 been removed. They are replaced by vector add and vector subtract operations
738 where one (vaddw, vsubw) or both (vaddl, vsubl) of the operands are either
739 sign-extended or zero-extended.
740</li>
741<li>
742 The llvm.arm.neon.vmulls, llvm.arm.neon.vmullu, llvm.arm.neon.vmlal*, and
743 llvm.arm.neon.vmlsl* intrinsics (lengthening vector multiply with and without
744 accumulation and subtraction) have been removed. These operations are now
745 represented as vector multiplications where the operands are either
746 sign-extended or zero-extended, followed by a vector add for vmlal or a
747 vector subtract for vmlsl. Note that the polynomial vector multiply
748 intrinsic, llvm.arm.neon.vmullp, remains unchanged.
749</li>
Bob Wilsone44f2982010-09-13 17:39:35 +0000750
751</ul>
Chris Lattneraa61f412009-10-13 17:48:04 +0000752</div>
Chris Lattnerc92d7692009-03-01 02:30:21 +0000753
Chris Lattneraa61f412009-10-13 17:48:04 +0000754<!--=========================================================================-->
755<div class="doc_subsection">
Chris Lattneraa61f412009-10-13 17:48:04 +0000756<a name="newapis">New Useful APIs</a>
757</div>
758
759<div class="doc_text">
760
761<p>This release includes a number of new APIs that are used internally, which
762 may also be useful for external clients.
763</p>
764
765<ul>
Chris Lattnerb3fa6bf2010-07-21 15:57:40 +0000766<li></li>
Chris Lattneraa61f412009-10-13 17:48:04 +0000767</ul>
768
769
770</div>
771
772<!--=========================================================================-->
773<div class="doc_subsection">
774<a name="otherimprovements">Other Improvements and New Features</a>
775</div>
776
777<div class="doc_text">
778<p>Other miscellaneous features include:</p>
779
780<ul>
Chris Lattnerb3fa6bf2010-07-21 15:57:40 +0000781<li></li>
Chris Lattnerc92d7692009-03-01 02:30:21 +0000782</ul>
783
784</div>
785
Chris Lattner6cb64032008-06-05 08:02:49 +0000786
787<!--=========================================================================-->
788<div class="doc_subsection">
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000789<a name="changes">Major Changes and Removed Features</a>
790</div>
791
792<div class="doc_text">
793
Chris Lattner934e2d42008-10-13 22:06:31 +0000794<p>If you're already an LLVM user or developer with out-of-tree changes based
Chris Lattnerb3fa6bf2010-07-21 15:57:40 +0000795on LLVM 2.7, this section lists some "gotchas" that you may run into upgrading
Chris Lattner934e2d42008-10-13 22:06:31 +0000796from the previous release.</p>
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000797
798<ul>
Chris Lattnerfc561ba2010-09-02 23:22:50 +0000799<li>.ll file doesn't produce #uses comments anymore, to get them, run a .bc file
800 through "llvm-dis --show-annotations".</li>
Chris Lattnerbd244042010-08-28 16:33:36 +0000801<li>MSIL Backend removed.</li>
802<li>ABCD and SSI passes removed.</li>
803<li>'Union' LLVM IR feature removed.</li>
Chris Lattner87e04952010-04-21 05:17:40 +0000804</ul>
Chris Lattner934e2d42008-10-13 22:06:31 +0000805
806<p>In addition, many APIs have changed in this release. Some of the major LLVM
807API changes are:</p>
808
809<ul>
Devang Pateldbf83832008-10-14 20:03:43 +0000810</ul>
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000811
Chris Lattner1e4d5bc2008-10-13 17:57:36 +0000812</div>
813
814
Chris Lattner3d482502003-10-02 04:57:28 +0000815<!-- *********************************************************************** -->
Misha Brukman80731b92003-11-22 00:38:41 +0000816<div class="doc_section">
817 <a name="knownproblems">Known Problems</a>
818</div>
Chris Lattner3d482502003-10-02 04:57:28 +0000819<!-- *********************************************************************** -->
820
Misha Brukman80731b92003-11-22 00:38:41 +0000821<div class="doc_text">
822
Mikhail Glushenkov25422542009-03-01 18:09:47 +0000823<p>This section contains significant known problems with the LLVM system,
Chris Lattner2a092392008-11-10 05:40:34 +0000824listed by component. If you run into a problem, please check the <a
Chris Lattnera69595e2005-10-29 07:07:09 +0000825href="http://llvm.org/bugs/">LLVM bug database</a> and submit a bug if
Chris Lattnerb84f3322003-12-12 21:22:16 +0000826there isn't already one.</p>
Chris Lattner3d482502003-10-02 04:57:28 +0000827
Misha Brukman80731b92003-11-22 00:38:41 +0000828</div>
Chris Lattner3d482502003-10-02 04:57:28 +0000829
Chris Lattnerb911de42004-03-14 02:03:02 +0000830<!-- ======================================================================= -->
831<div class="doc_subsection">
832 <a name="experimental">Experimental features included with this release</a>
833</div>
Chris Lattner3d482502003-10-02 04:57:28 +0000834
Chris Lattnerb911de42004-03-14 02:03:02 +0000835<div class="doc_text">
836
Misha Brukmanfa50a222004-05-12 21:46:05 +0000837<p>The following components of this LLVM release are either untested, known to
838be broken or unreliable, or are in early development. These components should
839not be relied on, and bugs should not be filed against them, but they may be
840useful to some people. In particular, if you would like to work on one of these
Chris Lattnere38ac152008-02-12 06:29:45 +0000841components, please contact us on the <a
842href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVMdev list</a>.</p>
Chris Lattnerb911de42004-03-14 02:03:02 +0000843
844<ul>
Chris Lattnerbd244042010-08-28 16:33:36 +0000845<li>The Alpha, SPU, MIPS, PIC16, Blackfin, MSP430, SystemZ and MicroBlaze
Wesley Peck3aa84e52010-03-18 14:31:30 +0000846 backends are experimental.</li>
Chris Lattnera67df2d2010-04-22 06:28:20 +0000847<li><tt>llc</tt> "<tt>-filetype=asm</tt>" (the default) is the only
Chris Lattnerb3fa6bf2010-07-21 15:57:40 +0000848 supported value for this option. XXX Update me</li>
Chris Lattnerb911de42004-03-14 02:03:02 +0000849</ul>
850
851</div>
Chris Lattner3d482502003-10-02 04:57:28 +0000852
Misha Brukman80731b92003-11-22 00:38:41 +0000853<!-- ======================================================================= -->
854<div class="doc_subsection">
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000855 <a name="x86-be">Known problems with the X86 back-end</a>
John Criswell3bdbd302005-11-08 21:11:33 +0000856</div>
857
858<div class="doc_text">
859
860<ul>
Anton Korobeynikov486c7d32008-06-08 10:24:13 +0000861 <li>The X86 backend does not yet support
862 all <a href="http://llvm.org/PR879">inline assembly that uses the X86
863 floating point stack</a>. It supports the 'f' and 't' constraints, but not
864 'u'.</li>
Duncan Sands0bc15262008-06-08 19:38:43 +0000865 <li>Win64 code generation wasn't widely tested. Everything should work, but we
John Criswellea03c9d2009-03-02 15:28:15 +0000866 expect small issues to happen. Also, llvm-gcc cannot build the mingw64
Chris Lattnera67df2d2010-04-22 06:28:20 +0000867 runtime currently due to lack of support for the 'u' inline assembly
868 constraint and for X87 floating point inline assembly.</li>
Dan Gohman721b3722008-06-08 23:05:11 +0000869 <li>The X86-64 backend does not yet support the LLVM IR instruction
Chris Lattnera67df2d2010-04-22 06:28:20 +0000870 <tt>va_arg</tt>. Currently, front-ends support variadic
Dan Gohman721b3722008-06-08 23:05:11 +0000871 argument constructs on X86-64 by lowering them manually.</li>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000872</ul>
873
874</div>
875
876<!-- ======================================================================= -->
877<div class="doc_subsection">
878 <a name="ppc-be">Known problems with the PowerPC back-end</a>
879</div>
880
881<div class="doc_text">
882
883<ul>
Nicolas Geoffray77d99502007-05-15 09:21:28 +0000884<li>The Linux PPC32/ABI support needs testing for the interpreter and static
Chris Lattnerbee7b322007-05-23 04:39:32 +0000885compilation, and lacks support for debug information.</li>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000886</ul>
887
888</div>
889
890<!-- ======================================================================= -->
891<div class="doc_subsection">
Chris Lattner97beb512007-05-14 06:56:09 +0000892 <a name="arm-be">Known problems with the ARM back-end</a>
893</div>
894
895<div class="doc_text">
896
897<ul>
Chris Lattnerbee7b322007-05-23 04:39:32 +0000898<li>Thumb mode works only on ARMv6 or higher processors. On sub-ARMv6
Duncan Sands47fc0a22007-09-26 15:59:54 +0000899processors, thumb programs can crash or produce wrong
Chris Lattnerbee7b322007-05-23 04:39:32 +0000900results (<a href="http://llvm.org/PR1388">PR1388</a>).</li>
John Criswellea03c9d2009-03-02 15:28:15 +0000901<li>Compilation for ARM Linux OABI (old ABI) is supported but not fully tested.
Chris Lattner97beb512007-05-14 06:56:09 +0000902</li>
Chris Lattner97beb512007-05-14 06:56:09 +0000903</ul>
904
905</div>
906
907<!-- ======================================================================= -->
908<div class="doc_subsection">
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000909 <a name="sparc-be">Known problems with the SPARC back-end</a>
910</div>
911
912<div class="doc_text">
913
914<ul>
John Criswellea03c9d2009-03-02 15:28:15 +0000915<li>The SPARC backend only supports the 32-bit SPARC ABI (-m32); it does not
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000916 support the 64-bit SPARC ABI (-m64).</li>
917</ul>
918
919</div>
920
921<!-- ======================================================================= -->
922<div class="doc_subsection">
Bruno Cardoso Lopes24eb3de2008-10-25 14:56:26 +0000923 <a name="mips-be">Known problems with the MIPS back-end</a>
924</div>
925
926<div class="doc_text">
927
928<ul>
Bruno Cardoso Lopes24eb3de2008-10-25 14:56:26 +0000929<li>64-bit MIPS targets are not supported yet.</li>
930</ul>
931
932</div>
933
934<!-- ======================================================================= -->
935<div class="doc_subsection">
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000936 <a name="alpha-be">Known problems with the Alpha back-end</a>
937</div>
938
939<div class="doc_text">
940
941<ul>
942
943<li>On 21164s, some rare FP arithmetic sequences which may trap do not have the
944appropriate nops inserted to ensure restartability.</li>
945
John Criswell3bdbd302005-11-08 21:11:33 +0000946</ul>
947</div>
948
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000949<!-- ======================================================================= -->
950<div class="doc_subsection">
Chris Lattner97beb512007-05-14 06:56:09 +0000951 <a name="c-be">Known problems with the C back-end</a>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000952</div>
953
954<div class="doc_text">
955
Chris Lattner086d2692010-09-29 05:34:42 +0000956<p>The C backend has numerous problems and is not being actively maintained.
957Depending on it for anything serious is not advised.</p>
958
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000959<ul>
Chris Lattnera1a4c9a2008-06-05 06:35:40 +0000960<li><a href="http://llvm.org/PR802">The C backend has only basic support for
961 inline assembly code</a>.</li>
Chris Lattner8e061162007-09-26 06:01:35 +0000962<li><a href="http://llvm.org/PR1658">The C backend violates the ABI of common
963 C++ programs</a>, preventing intermixing between C++ compiled by the CBE and
Gabor Greif75b2f762009-03-02 12:02:51 +0000964 C++ code compiled with <tt>llc</tt> or native compilers.</li>
Duncan Sandse09506a2008-02-10 13:40:55 +0000965<li>The C backend does not support all exception handling constructs.</li>
Duncan Sands3aa36732009-02-25 11:51:54 +0000966<li>The C backend does not support arbitrary precision integers.</li>
Chris Lattnerb81f10e2006-11-18 07:51:14 +0000967</ul>
968
969</div>
John Criswell3bdbd302005-11-08 21:11:33 +0000970
Misha Brukman80731b92003-11-22 00:38:41 +0000971
972<!-- ======================================================================= -->
973<div class="doc_subsection">
Chris Lattner086d2692010-09-29 05:34:42 +0000974 <a name="llvm-gcc">Known problems with the llvm-gcc front-end</a>
Misha Brukman80731b92003-11-22 00:38:41 +0000975</div>
Chris Lattner178f3db2003-10-02 05:07:23 +0000976
Misha Brukman80731b92003-11-22 00:38:41 +0000977<div class="doc_text">
Chris Lattner72a269f2006-03-03 00:34:26 +0000978
Chris Lattner086d2692010-09-29 05:34:42 +0000979<p>llvm-gcc is generally very stable for the C family of languages. The only
980 major language feature of GCC not supported by llvm-gcc is the
981 <tt>__builtin_apply</tt> family of builtins. However, some extensions
982 are only supported on some targets. For example, trampolines are only
983 supported on some targets (these are used when you take the address of a
984 nested function).</p>
Misha Brukman80731b92003-11-22 00:38:41 +0000985
Chris Lattner086d2692010-09-29 05:34:42 +0000986<p>Fortran support generally works, but there are still several unresolved bugs
987 in <a href="http://llvm.org/bugs/">Bugzilla</a>. Please see the
988 tools/gfortran component for details. Note that llvm-gcc is missing major
989 Fortran performance work in the frontend and library that went into GCC after
990 4.2. If you are interested in Fortran, we recommend that you consider using
991 <a href="#dragonegg">dragonegg</a> instead.</p>
Chris Lattner3d482502003-10-02 04:57:28 +0000992
Chris Lattner086d2692010-09-29 05:34:42 +0000993<p>The llvm-gcc 4.2 Ada compiler has basic functionality. However, this is not a
994mature technology, and problems should be expected. For example:</p>
Chris Lattnere38ac152008-02-12 06:29:45 +0000995<ul>
Duncan Sands56448462008-06-08 20:18:35 +0000996<li>The Ada front-end currently only builds on X86-32. This is mainly due
John Criswellea03c9d2009-03-02 15:28:15 +0000997to lack of trampoline support (pointers to nested functions) on other platforms.
998However, it <a href="http://llvm.org/PR2006">also fails to build on X86-64</a>
Chris Lattnere38ac152008-02-12 06:29:45 +0000999which does support trampolines.</li>
1000<li>The Ada front-end <a href="http://llvm.org/PR2007">fails to bootstrap</a>.
Duncan Sandsd34bf762009-02-25 11:59:06 +00001001This is due to lack of LLVM support for <tt>setjmp</tt>/<tt>longjmp</tt> style
1002exception handling, which is used internally by the compiler.
Chris Lattneraa61f412009-10-13 17:48:04 +00001003Workaround: configure with <tt>--disable-bootstrap</tt>.</li>
Duncan Sandsaef747f2008-10-13 17:27:23 +00001004<li>The c380004, <a href="http://llvm.org/PR2010">c393010</a>
1005and <a href="http://llvm.org/PR2421">cxg2021</a> ACATS tests fail
Duncan Sandsd34bf762009-02-25 11:59:06 +00001006(c380004 also fails with gcc-4.2 mainline).
1007If the compiler is built with checks disabled then <a href="http://llvm.org/PR2010">c393010</a>
1008causes the compiler to go into an infinite loop, using up all system memory.</li>
Duncan Sands2dbb00e2009-03-02 16:35:57 +00001009<li>Some GCC specific Ada tests continue to crash the compiler.</li>
Chris Lattneraa61f412009-10-13 17:48:04 +00001010<li>The <tt>-E</tt> binder option (exception backtraces)
Chris Lattnere38ac152008-02-12 06:29:45 +00001011<a href="http://llvm.org/PR1982">does not work</a> and will result in programs
Chris Lattneraa61f412009-10-13 17:48:04 +00001012crashing if an exception is raised. Workaround: do not use <tt>-E</tt>.</li>
Chris Lattnere38ac152008-02-12 06:29:45 +00001013<li>Only discrete types <a href="http://llvm.org/PR1981">are allowed to start
1014or finish at a non-byte offset</a> in a record. Workaround: do not pack records
1015or use representation clauses that result in a field of a non-discrete type
1016starting or finishing in the middle of a byte.</li>
Chris Lattnerb076b002008-06-08 21:19:07 +00001017<li>The <tt>lli</tt> interpreter <a href="http://llvm.org/PR2009">considers
1018'main' as generated by the Ada binder to be invalid</a>.
1019Workaround: hand edit the file to use pointers for <tt>argv</tt> and
1020<tt>envp</tt> rather than integers.</li>
1021<li>The <tt>-fstack-check</tt> option <a href="http://llvm.org/PR2008">is
1022ignored</a>.</li>
Chris Lattnere38ac152008-02-12 06:29:45 +00001023</ul>
1024</div>
1025
Chris Lattner3d482502003-10-02 04:57:28 +00001026<!-- *********************************************************************** -->
Misha Brukman80731b92003-11-22 00:38:41 +00001027<div class="doc_section">
1028 <a name="additionalinfo">Additional Information</a>
1029</div>
Chris Lattner3d482502003-10-02 04:57:28 +00001030<!-- *********************************************************************** -->
1031
Misha Brukman80731b92003-11-22 00:38:41 +00001032<div class="doc_text">
1033
Chris Lattnercb5596d2005-05-16 17:13:10 +00001034<p>A wide variety of additional information is available on the <a
Chris Lattnere0c1df42007-05-18 00:44:29 +00001035href="http://llvm.org">LLVM web page</a>, in particular in the <a
1036href="http://llvm.org/docs/">documentation</a> section. The web page also
Reid Spencerc7f87f22007-07-09 08:04:31 +00001037contains versions of the API documentation which is up-to-date with the
1038Subversion version of the source code.
Misha Brukman96158092005-03-30 19:14:24 +00001039You can access versions of these documents specific to this release by going
1040into the "<tt>llvm/doc/</tt>" directory in the LLVM tree.</p>
Chris Lattner3d482502003-10-02 04:57:28 +00001041
Misha Brukman80731b92003-11-22 00:38:41 +00001042<p>If you have any questions or comments about LLVM, please feel free to contact
Chris Lattnera69595e2005-10-29 07:07:09 +00001043us via the <a href="http://llvm.org/docs/#maillist"> mailing
Chris Lattnerb84f3322003-12-12 21:22:16 +00001044lists</a>.</p>
Chris Lattner3d482502003-10-02 04:57:28 +00001045
Misha Brukman80731b92003-11-22 00:38:41 +00001046</div>
Chris Lattner3d482502003-10-02 04:57:28 +00001047
1048<!-- *********************************************************************** -->
Chris Lattner3d482502003-10-02 04:57:28 +00001049
Misha Brukman80731b92003-11-22 00:38:41 +00001050<hr>
Misha Brukman68aab3b2003-11-22 01:23:39 +00001051<address>
Misha Brukman8834af92003-12-21 22:53:21 +00001052 <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
Misha Brukman86242e12008-12-11 17:34:48 +00001053 src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS"></a>
Misha Brukman68aab3b2003-11-22 01:23:39 +00001054 <a href="http://validator.w3.org/check/referer"><img
Misha Brukman86242e12008-12-11 17:34:48 +00001055 src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"></a>
Misha Brukman68aab3b2003-11-22 01:23:39 +00001056
Chris Lattnere0c1df42007-05-18 00:44:29 +00001057 <a href="http://llvm.org/">LLVM Compiler Infrastructure</a><br>
Misha Brukman80731b92003-11-22 00:38:41 +00001058 Last modified: $Date$
Misha Brukman68aab3b2003-11-22 01:23:39 +00001059</address>
Chris Lattner3d482502003-10-02 04:57:28 +00001060
Misha Brukman80731b92003-11-22 00:38:41 +00001061</body>
1062</html>