final hacking for tonight, still more to go.
[oota-llvm.git] / docs / ReleaseNotes.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2                       "http://www.w3.org/TR/html4/strict.dtd">
3 <html>
4 <head>
5   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6   <link rel="stylesheet" href="llvm.css" type="text/css">
7   <title>LLVM 2.7 Release Notes</title>
8 </head>
9 <body>
10
11 <div class="doc_title">LLVM 2.7 Release Notes</div>
12
13 <img align=right src="http://llvm.org/img/DragonSmall.png"
14     width="136" height="136">
15
16 <ol>
17   <li><a href="#intro">Introduction</a></li>
18   <li><a href="#subproj">Sub-project Status Update</a></li>
19   <li><a href="#externalproj">External Projects Using LLVM 2.7</a></li>
20   <li><a href="#whatsnew">What's New in LLVM 2.7?</a></li>
21   <li><a href="GettingStarted.html">Installation Instructions</a></li>
22   <li><a href="#portability">Portability and Supported Platforms</a></li>
23   <li><a href="#knownproblems">Known Problems</a></li>
24   <li><a href="#additionalinfo">Additional Information</a></li>
25 </ol>
26
27 <div class="doc_author">
28   <p>Written by the <a href="http://llvm.org">LLVM Team</a></p>
29 </div>
30
31 <!--
32 <h1 style="color:red">These are in-progress notes for the upcoming LLVM 2.7
33 release.<br>
34 You may prefer the
35 <a href="http://llvm.org/releases/2.6/docs/ReleaseNotes.html">LLVM 2.6
36 Release Notes</a>.</h1>-->
37
38 <!-- *********************************************************************** -->
39 <div class="doc_section">
40   <a name="intro">Introduction</a>
41 </div>
42 <!-- *********************************************************************** -->
43
44 <div class="doc_text">
45
46 <p>This document contains the release notes for the LLVM Compiler
47 Infrastructure, release 2.7.  Here we describe the status of LLVM, including
48 major improvements from the previous release and significant known problems.
49 All LLVM releases may be downloaded from the <a
50 href="http://llvm.org/releases/">LLVM releases web site</a>.</p>
51
52 <p>For more information about LLVM, including information about the latest
53 release, please check out the <a href="http://llvm.org/">main LLVM
54 web site</a>.  If you have questions or comments, the <a
55 href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVM Developer's
56 Mailing List</a> is a good place to send them.</p>
57
58 <p>Note that if you are reading this file from a Subversion checkout or the
59 main LLVM web page, this document applies to the <i>next</i> release, not the
60 current one.  To see the release notes for a specific release, please see the
61 <a href="http://llvm.org/releases/">releases page</a>.</p>
62
63 </div>
64  
65
66 <!--
67 Almost 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.
71   ABCD, GEPSplitterPass
72   MSIL backend?
73   lib/Transforms/Utils/SSI.cpp  -> ABCD depends on it.
74 -->
75  
76    
77 <!-- Features that need text if they're finished for 2.7:
78   strong phi elim
79   llvm.dbg.value: variable debug info for optimized code
80   loop dependence analysis
81  -->
82
83  <!-- for announcement email:
84  Logo web page.
85  llvm devmtg
86  compiler_rt
87  KLEE web page at klee.llvm.org
88  Many new papers added to /pubs/
89  Mention gcc plugin.
90    -->
91
92 <!-- *********************************************************************** -->
93 <div class="doc_section">
94   <a name="subproj">Sub-project Status Update</a>
95 </div>
96 <!-- *********************************************************************** -->
97
98 <div class="doc_text">
99 <p>
100 The LLVM 2.7 distribution currently consists of code from the core LLVM
101 repository (which roughly includes the LLVM optimizers, code generators
102 and supporting tools), the Clang repository and the llvm-gcc repository.  In
103 addition to this code, the LLVM Project includes other sub-projects that are in
104 development.  Here we include updates on these subprojects.
105 </p>
106
107 </div>
108
109
110 <!--=========================================================================-->
111 <div class="doc_subsection">
112 <a name="clang">Clang: C/C++/Objective-C Frontend Toolkit</a>
113 </div>
114
115 <div class="doc_text">
116
117 <p>The <a href="http://clang.llvm.org/">Clang project</a> is ...</p>
118
119 <p>In the LLVM 2.7 time-frame, the Clang team has made many improvements:</p>
120
121 <ul>
122 <li>FIXME: C++! Include a link to cxx_compatibility.html</li>
123
124 <li>FIXME: Static Analyzer improvements?</li>
125
126 <li>CIndex API and Python bindings: Clang now includes a C API as part of the
127 CIndex library. Although we make make some changes to the API in the future, it
128 is intended to be stable and has been designed for use by external projects. See
129 the Clang
130 doxygen <a href="http://clang.llvm.org/doxygen/group__CINDEX.html">CIndex</a>
131 documentation for more details. The CIndex API also includings an preliminary
132 set of Python bindings.</li>
133
134 <li>ARM Support: Clang now has ABI support for both the Darwin and Linux ARM
135 ABIs. Coupled with many improvements to the LLVM ARM backend, Clang is now
136 suitable for use as a a beta quality ARM compiler.</li>
137 </ul>
138 </div>
139
140 <!--=========================================================================-->
141 <div class="doc_subsection">
142 <a name="clangsa">Clang Static Analyzer</a>
143 </div>
144
145 <div class="doc_text">
146
147 <p>Previously announced in the 2.4, 2.5, and 2.6 LLVM releases, the Clang project also
148 includes an early stage static source code analysis tool for <a
149 href="http://clang.llvm.org/StaticAnalysis.html">automatically finding bugs</a>
150 in C and Objective-C programs. The tool performs checks to find
151 bugs that occur on a specific path within a program.</p>
152
153 <p>In the LLVM 2.7 time-frame, the analyzer core has sprouted legs and...</p>
154
155 </div>
156
157 <!--=========================================================================-->
158 <div class="doc_subsection">
159 <a name="vmkit">VMKit: JVM/CLI Virtual Machine Implementation</a>
160 </div>
161
162 <div class="doc_text">
163 <p>
164 The <a href="http://vmkit.llvm.org/">VMKit project</a> is an implementation of
165 a JVM and a CLI Virtual Machine (Microsoft .NET is an
166 implementation of the CLI) using LLVM for static and just-in-time
167 compilation.</p>
168
169 <p>
170 With the release of LLVM 2.7, VMKit has shifted to a great framework for writing
171 virtual machines. VMKit now offers precise and efficient garbage collection with
172 multi-threading support, thanks to the MMTk memory management toolkit, as well
173 as just in time and ahead of time compilation with LLVM.  The major changes in
174 VMKit 0.27 are:</p>
175
176 <ul>
177
178 <li>Garbage collection: VMKit now uses the MMTk toolkit for garbage collectors.
179   The first collector to be ported is the MarkSweep collector, which is precise,
180   and drastically improves the performance of VMKit.</li>
181 <li>Line number information in the JVM: by using the debug metadata of LLVM, the
182  JVM now supports precise line number information, useful when printing a stack
183  trace.</li>
184 <li>Interface calls in the JVM: we implemented a variant of the Interface Method
185   Table technique for interface calls in the JVM.
186 </li>
187
188 </ul>
189 </div>
190
191
192 <!--=========================================================================-->
193 <div class="doc_subsection">
194 <a name="compiler-rt">compiler-rt: Compiler Runtime Library</a>
195 </div>
196
197 <div class="doc_text">
198 <p>
199 The new LLVM <a href="http://compiler-rt.llvm.org/">compiler-rt project</a>
200 is a simple library that provides an implementation of the low-level
201 target-specific hooks required by code generation and other runtime components.
202 For example, when compiling for a 32-bit target, converting a double to a 64-bit
203 unsigned integer is compiled into a runtime call to the "__fixunsdfdi"
204 function. The compiler-rt library provides highly optimized implementations of
205 this and other low-level routines (some are 3x faster than the equivalent
206 libgcc routines).</p>
207
208 <p>
209 All of the code in the compiler-rt project is available under the standard LLVM
210 License, a "BSD-style" license.  New in LLVM 2.7: compiler_rt now
211 supports ARM targets.</p>
212
213 </div>
214
215 <!--=========================================================================-->
216 <div class="doc_subsection">
217 <a name="dragonegg">DragonEgg: llvm-gcc ported to gcc-4.5</a>
218 </div>
219
220 <div class="doc_text">
221 <p>
222 <a href="http://dragonegg.llvm.org/">DragonEgg</a> is a port of llvm-gcc to
223 gcc-4.5.  Unlike llvm-gcc, which makes many intrusive changes to the underlying
224 gcc-4.2 code, dragonegg in theory does not require any gcc-4.5 modifications
225 whatsoever (currently one small patch is needed).  This is thanks to the new
226 <a href="http://gcc.gnu.org/wiki/plugins">gcc plugin architecture</a>, which
227 makes it possible to modify the behaviour of gcc at runtime by loading a plugin,
228 which is nothing more than a dynamic library which conforms to the gcc plugin
229 interface.  DragonEgg is a gcc plugin that causes the LLVM optimizers to be run
230 instead of the gcc optimizers, and the LLVM code generators instead of the gcc
231 code generators, just like llvm-gcc.  To use it, you add
232 "-fplugin=path/dragonegg.so" to the gcc-4.5 command line, and gcc-4.5 magically
233 becomes llvm-gcc-4.5!
234 </p>
235
236 <p>
237 DragonEgg is still a work in progress.  Currently C works very well, while C++,
238 Ada and Fortran work fairly well.  All other languages either don't work at all,
239 or only work poorly.  For the moment only the x86-32 and x86-64 targets are
240 supported, and only on linux and darwin (darwin needs an additional gcc patch).
241 </p>
242
243 <p>
244 The first dragonegg release will occur shortly after llvm-2.7 is released.
245 </p>
246
247 </div>
248
249
250 <!--=========================================================================-->
251 <div class="doc_subsection">
252 <a name="mc">llvm-mc: Machine Code Toolkit</a>
253 </div>
254
255 <div class="doc_text">
256 <p>
257 The LLVM Machine Code (MC) Toolkit project is ...
258 </p>
259
260 <p>
261 MC Disassembler (with blog post), MCInstPrinter.  Many X86 backend and AsmPrinter simplifications
262 Can transcode from GAS to intel syntax with "llvm-mc foo.s -output-asm-variant=1"
263 </p>
264
265 </div>  
266
267
268 <!-- *********************************************************************** -->
269 <div class="doc_section">
270   <a name="externalproj">External Open Source Projects Using LLVM 2.7</a>
271 </div>
272 <!-- *********************************************************************** -->
273
274 <div class="doc_text">
275
276 <p>An exciting aspect of LLVM is that it is used as an enabling technology for
277    a lot of other language and tools projects.  This section lists some of the
278    projects that have already been updated to work with LLVM 2.7.</p>
279 </div>
280
281 <!--=========================================================================-->
282 <div class="doc_subsection">
283 <a name="pure">Pure</a>
284 </div>
285
286 <div class="doc_text">
287 <p>
288 <a href="http://pure-lang.googlecode.com/">Pure</a>
289 is an algebraic/functional programming language based on term rewriting.
290 Programs are collections of equations which are used to evaluate expressions in
291 a symbolic fashion. Pure offers dynamic typing, eager and lazy evaluation,
292 lexical closures, a hygienic macro system (also based on term rewriting),
293 built-in list and matrix support (including list and matrix comprehensions) and
294 an easy-to-use C interface. The interpreter uses LLVM as a backend to
295  JIT-compile Pure programs to fast native code.</p>
296
297 <p>Pure versions 0.43 and later have been tested and are known to work with
298 LLVM 2.7 (and continue to work with older LLVM releases >= 2.5).</p>
299
300 </div>
301
302 <!--=========================================================================-->
303 <div class="doc_subsection">
304 <a name="RoadsendPHP">Roadsend PHP</a>
305 </div>
306
307 <div class="doc_text">
308 <p>
309 <a href="http://code.roadsend.com/rphp">Roadsend PHP</a> (rphp) is an open
310 source implementation of the PHP programming 
311 language that uses LLVM for its optimizer, JIT and static compiler. This is a 
312 reimplementation of an earlier project that is now based on LLVM.
313 </p>
314 </div>
315
316 <!--=========================================================================-->
317 <div class="doc_subsection">
318 <a name="UnladenSwallow">Unladen Swallow</a>
319 </div>
320
321 <div class="doc_text">
322 <p>
323 <a href="http://code.google.com/p/unladen-swallow/">Unladen Swallow</a> is a
324 branch of <a href="http://python.org/">Python</a> intended to be fully
325 compatible and significantly faster.  It uses LLVM's optimization passes and JIT
326 compiler.
327 </p>
328 </div>
329
330 <!--=========================================================================-->
331 <div class="doc_subsection">
332 <a name="tce">TTA-based Codesign Environment (TCE)</a>
333 </div>
334
335 <div class="doc_text">
336 <p>
337 <a href="http://tce.cs.tut.fi/">TCE</a> is a toolset for designing
338 application-specific processors (ASP) based on the Transport triggered
339 architecture (TTA). The toolset provides a complete co-design flow from C/C++
340 programs down to synthesizable VHDL and parallel program binaries. Processor
341 customization points include the register files, function units, supported
342 operations, and the interconnection network.</p>
343
344 <p>TCE uses llvm-gcc/Clang and LLVM for C/C++ language support, target
345 independent optimizations and also for parts of code generation. It generates
346 new LLVM-based code generators "on the fly" for the designed TTA processors and
347 loads them in to the compiler backend as runtime libraries to avoid per-target
348 recompilation of larger parts of the compiler chain.</p>
349
350 </div>
351
352 <!--=========================================================================-->
353 <div class="doc_subsection">
354 <a name="safecode">SAFECode Compiler</a>
355 </div>
356
357 <div class="doc_text">
358 <p>
359 <a href="http://safecode.cs.illinois.edu">SAFECode</a> is a memory safe C
360 compiler built using LLVM.  It takes standard, unannotated C code, analyzes the
361 code to ensure that memory accesses and array indexing operations are safe, and
362 instruments the code with run-time checks when safety cannot be proven
363 statically.
364 </p>
365 </div>
366
367
368 <!-- *********************************************************************** -->
369 <div class="doc_section">
370   <a name="whatsnew">What's New in LLVM 2.7?</a>
371 </div>
372 <!-- *********************************************************************** -->
373
374 <div class="doc_text">
375
376 <p>This release includes a huge number of bug fixes, performance tweaks and
377 minor improvements.  Some of the major improvements and new features are listed
378 in this section.
379 </p>
380
381 <p>In addition to changes to the code, between LLVM 2.6 and 2.7, a number of
382 organization changes have happened:
383 </p>
384
385 <ul>
386 <li>LLVM has a new <a href="http://llvm.org/Logo.html">official Logo</a>!</li>
387
388 <li>Ted Kremenek and Doug Gregor have stepped forward as <a
389  href="http://llvm.org/docs/DeveloperPolicy.html#owners">Code Owners</a> of the
390  Clang static analyzer and the Clang Frontend, respectively.</li>
391
392 <li>LLVM now has an <a href="http://blog.llvm.org">official Blog</a> at
393     <a href="http://blog.llvm.org">http://blog.llvm.org</a>. This is a great way
394     to learn about new LLVM-related features as they are implemented.  Several
395     features in this release are already explained on the blog.</li>
396
397 <li>The LLVM web pages are now checked into the SVN server, in the "www",
398     "www-pubs" and "www-releases" SVN modules.  Previously they were hidden in a
399     largely inaccessible old CVS server.</p>
400
401 <li><a href="http://llvm.org">llvm.org</a> is now hosted on a new (and much
402     faster) server.  It is still graciously hosted at the University of Illinois
403     of Urbana Champaign.</li>
404 </ul>
405 </div>
406
407 <!--=========================================================================-->
408 <div class="doc_subsection">
409 <a name="majorfeatures">Major New Features</a>
410 </div>
411
412 <div class="doc_text">
413
414 <p>LLVM 2.7 includes several major new capabilities:</p>
415
416 <ul>
417 <li>This release includes initial support for the <a
418   href="http://en.wikipedia.org/wiki/MicroBlaze">MicroBlaze</a> target.
419   MicroBlaze is a soft processor core designed for Xilinx FPGAs.</li>
420
421 <li>LLVM 2.7 includes a new LLVM IR "extensible metadata" feature.  This feature
422  supports many different use cases, including allowing front-end authors to
423  encode source level information into LLVM IR, which is consumed by later
424  language-specific passes.  This is a great way to do high-level optimizations
425  like devirtualization, type-based alias analysis, etc.  See the <a 
426  href="http://blog.llvm.org/2010/04/extensible-metadata-in-llvm-ir.html">
427  Extensible Metadata Blog Post</a> for more information.</li>
428  
429 <li>LLVM 2.7 encodes <a href="SourceLevelDebugging.html">debug information</a>
430 in a completely new way, built on extensible metadata.  The new implementation
431 is much more memory efficient and paves the way for improvements to optimized
432 code debugging experience.</li>
433
434 <li>LLVM 2.7 now directly supports taking the address of a label and doing an
435     indirect branch through a pointer.  This is particularly useful for
436     interpreter loops, and is used to implement the GCC "address of label"
437     extension.  For more information, see the <a 
438 href="http://blog.llvm.org/2010/01/address-of-label-and-indirect-branches.html">
439 Address of Label and Indirect Branches in LLVM IR Blog Post</a>.
440
441 <li>LLVM 2.7 is the first release to start supporting APIs for assembling and
442     disassembling target machine code.  These APIs are useful for a variety of
443     low level clients, and are surfaced in the new "enhanced disassembly" API.
444     For more information see the <a 
445     href="http://blog.llvm.org/2010/01/x86-disassembler.html">The X86
446     Disassembler Blog Post</a> for more information.</li>
447
448 <li>LLVM 2.7 includes major parts of the work required by the new MC Project,
449     which aims to rework our handling of low-level machine code.  A few targets
450     have been refactored to support it, and work is underway to support a native
451     assembler in LLVM.  This work is not complete in LLVM 2.7, but you has made
452     substantially more progress on LLVM mainline.  You can read more about this
453     in the <a href="http://blog.llvm.org/2010/04/intro-to-llvm-mc-project.html">
454     Intro to the LLVM MC Project Blog Post</a>.
455 </li>
456
457 </ul>
458
459 </div>
460
461 <!--=========================================================================-->
462 <div class="doc_subsection">
463 <a name="coreimprovements">LLVM IR and Core Improvements</a>
464 </div>
465
466 <div class="doc_text">
467 <p>LLVM IR has several new features for better support of new targets and that
468 expose new optimization opportunities:</p>
469
470 <ul>
471 <li>LLVM IR now supports a 16-bit "half float" data type through two new <a
472     href="LangRef.html#int_fp16">intrinsics</a> and APFloat support.</li>
473 <li>LLVM IR supports two <a href="LangRef.html#fnattrs">new function
474     attributes</a>: inlinehint and alignstack(n).  The former is a hint to the
475     optimizer that a function was declared 'inline' and thus it might be useful
476     to increase the chances the the inliner actually inline it.  The later
477     indicates to the code generator that the function diverges from the platform
478     ABI on stack alignment.</li>
479 <li>The new <a href="LangRef.html#int_objectsize">llvm.objectsize</a> intrinsic
480     allows the optimizer to infer the sizes of memory objects in some cases.
481     This intrinsic is used to implement the GCC __builtin_object_size
482     extension.</li>
483 <li>LLVM 2.7 has pre-alpha support for <a
484   href="http://llvm.org/docs/LangRef.html#t_union">unions in LLVM IR</a>.
485   Unfortuantely, this support is not really usable in 2.7, so if you're
486  interested in pushing it forward, please help contribute to LLVM mainline.</li>
487 </li>
488 </ul>
489
490 </div>
491
492 <!--=========================================================================-->
493 <div class="doc_subsection">
494 <a name="optimizer">Optimizer Improvements</a>
495 </div>
496
497 <div class="doc_text">
498
499 <p>In addition to a large array of minor performance tweaks and bug fixes, this
500 release includes a few major enhancements and additions to the optimizers:</p>
501
502 <ul>
503
504 <li>Inliner reuses arrays allocas when inlining multiple callers to reduce stack usage.</li>
505 <li>Instcombine is now a library, has its own IRBuilder to simplify itself.</li>
506 <li>Better code size analysis in loop unswitch, inliner code split out to a new 
507   CodeMetrics class for reuse.</li>
508 <li>Many changes to the pass ordering for improved optimization
509    effectiveness.</li>
510 <li>BasicAA improved to be less dependent on "type safe" pointers, it can now look
511   through bitcasts more aggressively.</li>
512 <li>GVN PHI Translation improvements. blog post: http://blog.llvm.org/2009/12/advanced-topics-in-redundant-load.html</li>
513 <li>New SCEV AA pass: -scev-aa</li>
514 <li>Target data now has notion of 'native' integer data types which optimizations can use.</li>
515 <li>Opt now works conservatively if no target data is set (is this fully working?)</li>
516 <li>New Analysis/InstructionSimplify.h interface for simplifying instructions that don't exist.</li>
517 <li>Jump threading is now much more aggressive at simplifying correlated
518    conditionals and threading blocks with otherwise complex logic. CondProp pass
519    removed (functionality merged into jump threading).</li>
520 <li>New SSAUpdater and MachineSSAUpdater classes for unstructured ssa updating,
521   changed jump threading, GVN, etc to use it which simplified them and speed
522   them up.</li>
523
524
525 <li>
526 The Optimal Edge Profiling implementation in 2.6 was more a proof of 
527 concept. The current implementation (the one that will go into 2.7) is 
528 now stable and (as far as my tests go) bug free.
529
530 The profiling with instrumentation via "opt" and analysis via the tool 
531 "llvm-prof" should Work As Expected (TM).
532
533 Two things are missing:
534
535 *) Still missing is the modification of all -std-compile-opt passes to 
536 update the profiling information according to the changes made to the 
537 CFG, I'm planning to do this after my master thesis is finished. This 
538 will enable all passes to use the ProfileInfo if available and base 
539 decisions on that information.
540
541 *) GCC has the options "-pg", "-fprofile-arcs" and "--coverage" that 
542 insert profiling code and "-fprofile-use" to use them the next time 
543 during compilation. I guess this options should also work properly in 
544 llvm-gcc and clang?</li>
545
546 </ul>
547
548 </div>
549
550
551 <!--=========================================================================-->
552 <div class="doc_subsection">
553 <a name="executionengine">Interpreter and JIT Improvements</a>
554 </div>
555
556 <div class="doc_text">
557
558 <ul>
559 <li>The JIT now supports generating debug information, which is compatible with
560 the new GDB 7.0 (and later) interfaces for registering debug info for
561 dynamically generated code.</li>
562
563 <li>The JIT now <a
564 href="http://llvm.org/viewvc/llvm-project?view=rev&revision=85295">defaults
565 to compiling eagerly</a> to avoid a race condition in the lazy JIT.
566 Clients that still want the lazy JIT can switch it on by calling
567 <tt>ExecutionEngine::DisableLazyCompilation(false)</tt>.</li>
568
569 <li>It is now possible to create more than one JIT instance in the same process.
570 These JITs can generate machine code in parallel,
571 although <a href="http://llvm.org/docs/ProgrammersManual.html#jitthreading">you
572 still have to obey the other threading restrictions</a>.</li>
573
574 </ul>
575
576 </div>
577
578 <!--=========================================================================-->
579 <div class="doc_subsection">
580 <a name="codegen">Target Independent Code Generator Improvements</a>
581 </div>
582
583 <div class="doc_text">
584
585 <p>We have put a significant amount of work into the code generator
586 infrastructure, which allows us to implement more aggressive algorithms and make
587 it run faster:</p>
588
589 <ul>
590 <li>New instruction selector [blog post?].</li>
591 <li>New LSR with "full strength reduction" mode.  Description?</li>
592 <li>Code generator MC'ized except for debug info and EH.</li>
593 <li>New CodeGen Level CSE</li>
594 <li>Combiner-AA improvements, why not on by default?</li>
595 <li>Pre-regalloc tail duplication</li>
596 <li>Codegen level OptimizeExtsPass pass, takes advantage of x86 subregs. </li>
597 <li>Support for the GCC option -fno-schedule-insns</li>
598 <li>Non-temporal load/store, only implemented on X86, see LangRef.html#i_load.</li>
599 <li>MachineSSAUpdater.h</li>
600 <li>X86 and XCore supports returning arbitrary return values, returning too many values is
601    supported by returning through a hidden pointer.</li>
602 <li>verbose-asm now produces information about spill slots and loop nests</li>
603 <li>GHC Haskell ABI / calling conv support.</li>
604 <li>Many improvements to debug info</li>
605 </ul>
606 </div>
607
608 <!--=========================================================================-->
609 <div class="doc_subsection">
610 <a name="x86">X86-32 and X86-64 Target Improvements</a>
611 </div>
612
613 <div class="doc_text">
614 <p>New features of the X86 target include:
615 </p>
616
617 <ul>
618 <li>The X86 backend now optimizes tails calls much more aggressively for
619     functions that use the standard C calling convention.</li>
620 <li>The X86 backend now models scalar SSE registers as subregs of the SSE vector
621     registers, making the code generator more aggressive in cases where scalars
622     and vector types are mixed.</li>
623
624 <li>PostRA scheduler for X86? FIXME: is this on by default in 2.7?</li>
625
626 </ul>
627
628 </div>
629
630 <!--=========================================================================-->
631 <div class="doc_subsection">
632 <a name="ARM">ARM Target Improvements</a>
633 </div>
634
635 <div class="doc_text">
636 <p>New features of the ARM target include:
637 </p>
638
639 <ul>
640
641 <li>The ARM backend now generates instructions in unified assembly syntax.</li>
642
643 <li>llvm-gcc now has complete support for the ARM v7 NEON instruction set.  This
644    support differs slightly from the GCC implementation.  Please see the
645    <a
646 href="http://blog.llvm.org/2010/04/arm-advanced-simd-neon-intrinsics-and.html">
647   ARM Advanced SIMD (NEON) Intrinsics and Types in LLVM Blog Post</a> for
648   helpful information if migrating code from GCC to LLVM-GCC.</li>
649   
650 <li>The ARM and Thumb code generators now using register scavenging for stack
651     object address materialization.(FIXME: WHAT BENEFIT DOES THIS PROVIDE?)</li>
652     
653 <li>The ARM backend now has good support for ARMv4 targets, and has been tested
654     on StrongARM hardware.  Previously, LLVM only supported ARMv4T and
655     newer chips.</li>
656 </ul>
657
658
659 </div>
660
661 <!--=========================================================================-->
662 <div class="doc_subsection">
663 <a name="newapis">New Useful APIs</a>
664 </div>
665
666 <div class="doc_text">
667
668 <p>This release includes a number of new APIs that are used internally, which
669    may also be useful for external clients.
670 </p>
671
672 <ul>
673 <li>The llvm/Support/Regex.h header exposes a platform independent regular
674     expression API.  Building on this, the <a
675     href="TestingGuide.html#FileCheck">FileCheck</a> utility now supports
676     regular exressions.</li>
677 <li>raw_ostream now supports a circular "debug stream" accessed with "dbgs()".
678     By default, this stream works the same way as "errs()", but if you pass
679     <tt>-debug-buffer-size=1000</tt> to opt, the debug stream is capped to a
680     fixed sized circular buffer and the output is printed at the end of the
681     program's execution.  This is helpful if you have a long lived compiler
682     process and you're interested in seeing snapshots in time.</li>
683 </ul>
684
685
686 </div>
687
688 <!--=========================================================================-->
689 <div class="doc_subsection">
690 <a name="otherimprovements">Other Improvements and New Features</a>
691 </div>
692
693 <div class="doc_text">
694 <p>Other miscellaneous features include:</p>
695
696 <ul>
697 <li>You can now build LLVM as a big dynamic library (e.g. "libllvm2.7.so"). To
698     get this, configure LLVM with the --enable-shared option.</li>
699
700 <li>LLVM command line tools now overwrite their output by default, before they
701     would only do this with -f. This makes them more convenient to use, and
702     behave more like standard unix tools.</li>
703
704 <li>The opt and llc tools now autodetect whether their input is a .ll or .bc
705     file, and automatically do the right thing.  This means you don't need to
706     explicitly use the llvm-as tool for most things.</li>
707 </ul>
708
709 </div>
710
711
712 <!--=========================================================================-->
713 <div class="doc_subsection">
714 <a name="changes">Major Changes and Removed Features</a>
715 </div>
716
717 <div class="doc_text">
718
719 <p>If you're already an LLVM user or developer with out-of-tree changes based
720 on LLVM 2.6, this section lists some "gotchas" that you may run into upgrading
721 from the previous release.</p>
722
723 <ul>
724
725 <li>
726 The Andersen's alias analysis ("anders-aa") pass, the Predicate Simplifier
727 ("predsimplify") pass, the LoopVR pass, the GVNPRE pass, and the random sampling
728 profiling ("rsprofiling") passes have all been removed.  They were not being
729 actively maintained and had substantial problems.  If you are interested in
730 these components, you are welcome to ressurect them from SVN, fix the
731 correctness problems, and resubmit them to mainline.</li>
732
733 <li>LLVM now defaults to building most libraries with RTTI turned off, providing
734 a code size reduction.  Packagers who are interested in building LLVM to support
735 plugins that require RTTI information should build with "make REQUIRE_RTTI=1"
736 and should read the new <a href="Packaging.html">Advice on Packaging LLVM</a>
737 document.</li>
738
739 <li>The LLVM interpreter now defaults to <em>not</em> using <tt>libffi</tt> even
740 if you have it installed.  This makes it more likely that an LLVM built on one
741 system will work when copied to a similar system.  To use <tt>libffi</tt>,
742 configure with <tt>--enable-libffi</tt></li>.
743
744 <li>Debug information uses a completely different representation, an LLVM 2.6
745 .bc file should work with LLVM 2.7, but debug info won't come forward.</li>
746
747 <li>The LLVM 2.6 (and earlier) "malloc" and "free" instructions got removed,
748     along with LowerAllocations pass.  Now you should just use a call to the
749     malloc and free functions in libc.  These calls are optimized as well as
750     the old instructions were.</li>
751 </ul>
752
753 <p>In addition, many APIs have changed in this release.  Some of the major LLVM
754 API changes are:</p>
755
756 <ul>
757 <li>Just about everything has been converted to use raw_ostream instead of
758     std::ostream.</li>
759 <li>llvm/ADT/iterator.h has been removed, just use &lt;iterator&gt;
760  instead.</li>
761 <li>The Streams.h file and "DOUT" got removed, use "DEBUG(errs() &lt;&lt; ...);"
762    instead.</li>
763 <li><tt>ModuleProvider</tt> has been <a
764 href="http://llvm.org/viewvc/llvm-project?view=rev&revision=94686">removed</a>
765 and its methods moved to <tt>Module</tt> and <tt>GlobalValue</tt>.
766 Most clients can remove uses of <tt>ExistingModuleProvider</tt>,
767 replace <tt>getBitcodeModuleProvider</tt> with
768 <tt>getLazyBitcodeModule</tt>, and pass their <tt>Module</tt> to
769 functions that used to accept <tt>ModuleProvider</tt>.  Clients who
770 wrote their own <tt>ModuleProvider</tt>s will need to derive from
771 <tt>GVMaterializer</tt> instead and use
772 <tt>Module::setMaterializer</tt> to attach it to a
773 <tt>Module</tt>.</li>
774
775 <li><tt>GhostLinkage</tt> has given up the ghost.
776 <tt>GlobalValue</tt>s that have not yet been read from their backing
777 storage have the same linkage they will have after being read in.
778 Clients must replace calls to
779 <tt>GlobalValue::hasNotBeenReadFromBitcode</tt> with
780 <tt>GlobalValue::isMaterializable</tt>.</li>
781
782 <li>The <tt>llvm/Support/DataTypes.h</tt> header has moved
783 to <tt>llvm/System/DataTypes.h</tt>.</li>
784
785 <li>The <tt>isInteger</tt>, <tt>isIntOrIntVector</tt>, <tt>isFloatingPoint</tt>,
786 <tt>isFPOrFPVector</tt> and <tt>isFPOrFPVector</tt> methods have been renamed
787 <tt>isIntegerTy</tt>, <tt>isIntOrIntVectorTy</tt>, <tt>isFloatingPointTy</tt>, 
788 <tt>isFPOrFPVectorTy</tt> and <tt>isFPOrFPVectorTy</tt> respectively.</li>
789 </ul>
790
791 </div>
792
793
794
795 <!-- *********************************************************************** -->
796 <div class="doc_section">
797   <a name="portability">Portability and Supported Platforms</a>
798 </div>
799 <!-- *********************************************************************** -->
800
801 <div class="doc_text">
802
803 <p>LLVM is known to work on the following platforms:</p>
804
805 <ul>
806 <li>Intel and AMD machines (IA32, X86-64, AMD64, EMT-64) running Red Hat
807     Linux, Fedora Core, FreeBSD and AuroraUX (and probably other unix-like
808     systems).</li>
809 <li>PowerPC and X86-based Mac OS X systems, running 10.3 and above in 32-bit
810     and 64-bit modes.</li>
811 <li>Intel and AMD machines running on Win32 using MinGW libraries (native).</li>
812 <li>Intel and AMD machines running on Win32 with the Cygwin libraries (limited
813     support is available for native builds with Visual C++).</li>
814 <li>Sun x86 and AMD64 machines running Solaris 10, OpenSolaris 0906.</li>
815 <li>Alpha-based machines running Debian GNU/Linux.</li>
816 </ul>
817
818 <p>The core LLVM infrastructure uses GNU autoconf to adapt itself
819 to the machine and operating system on which it is built.  However, minor
820 porting may be required to get LLVM to work on new platforms.  We welcome your
821 portability patches and reports of successful builds or error messages.</p>
822
823 </div>
824
825 <!-- *********************************************************************** -->
826 <div class="doc_section">
827   <a name="knownproblems">Known Problems</a>
828 </div>
829 <!-- *********************************************************************** -->
830
831 <div class="doc_text">
832
833 <p>This section contains significant known problems with the LLVM system,
834 listed by component.  If you run into a problem, please check the <a
835 href="http://llvm.org/bugs/">LLVM bug database</a> and submit a bug if
836 there isn't already one.</p>
837
838 <ul>    
839 <li>LLVM will not correctly compile on Solaris and/or OpenSolaris
840 using the stock GCC 3.x.x series 'out the box',
841 See: <a href="GettingStarted.html#brokengcc">Broken versions of GCC and other tools</a>.
842 However, A <a href="http://pkg.auroraux.org/GCC">Modern GCC Build</a>
843 for x86/x86-64 has been made available from the third party AuroraUX Project
844 that has been meticulously tested for bootstrapping LLVM &amp; Clang.</li>
845 </ul>
846
847 </div>
848
849 <!-- ======================================================================= -->
850 <div class="doc_subsection">
851   <a name="experimental">Experimental features included with this release</a>
852 </div>
853
854 <div class="doc_text">
855
856 <p>The following components of this LLVM release are either untested, known to
857 be broken or unreliable, or are in early development.  These components should
858 not be relied on, and bugs should not be filed against them, but they may be
859 useful to some people.  In particular, if you would like to work on one of these
860 components, please contact us on the <a
861 href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVMdev list</a>.</p>
862
863 <ul>
864 <li>The MSIL, Alpha, SPU, MIPS, PIC16, Blackfin, MSP430, SystemZ and MicroBlaze
865     backends are experimental.</li>
866 <li>The <tt>llc</tt> "<tt>-filetype=asm</tt>" (the default) is the only
867     supported value for this option.  The MachO writer is experimental, and
868     works much better in mainline SVN.</li>
869 </ul>
870
871 </div>
872
873 <!-- ======================================================================= -->
874 <div class="doc_subsection">
875   <a name="x86-be">Known problems with the X86 back-end</a>
876 </div>
877
878 <div class="doc_text">
879
880 <ul>
881   <li>The X86 backend does not yet support
882     all <a href="http://llvm.org/PR879">inline assembly that uses the X86
883     floating point stack</a>.  It supports the 'f' and 't' constraints, but not
884     'u'.</li>
885   <li>The X86 backend generates inefficient floating point code when configured
886     to generate code for systems that don't have SSE2.</li>
887   <li>Win64 code generation wasn't widely tested. Everything should work, but we
888     expect small issues to happen. Also, llvm-gcc cannot build the mingw64
889     runtime currently due
890     to <a href="http://llvm.org/PR2255">several</a>
891     <a href="http://llvm.org/PR2257">bugs</a> and due to lack of support for
892     the
893     'u' inline assembly constraint and for X87 floating point inline assembly.</li>
894   <li>The X86-64 backend does not yet support the LLVM IR instruction
895       <tt>va_arg</tt>. Currently, the llvm-gcc and front-ends support variadic
896       argument constructs on X86-64 by lowering them manually.</li>
897 </ul>
898
899 </div>
900
901 <!-- ======================================================================= -->
902 <div class="doc_subsection">
903   <a name="ppc-be">Known problems with the PowerPC back-end</a>
904 </div>
905
906 <div class="doc_text">
907
908 <ul>
909 <li>The Linux PPC32/ABI support needs testing for the interpreter and static
910 compilation, and lacks support for debug information.</li>
911 </ul>
912
913 </div>
914
915 <!-- ======================================================================= -->
916 <div class="doc_subsection">
917   <a name="arm-be">Known problems with the ARM back-end</a>
918 </div>
919
920 <div class="doc_text">
921
922 <ul>
923 <li>Thumb mode works only on ARMv6 or higher processors. On sub-ARMv6
924 processors, thumb programs can crash or produce wrong
925 results (<a href="http://llvm.org/PR1388">PR1388</a>).</li>
926 <li>Compilation for ARM Linux OABI (old ABI) is supported but not fully tested.
927 </li>
928 </ul>
929
930 </div>
931
932 <!-- ======================================================================= -->
933 <div class="doc_subsection">
934   <a name="sparc-be">Known problems with the SPARC back-end</a>
935 </div>
936
937 <div class="doc_text">
938
939 <ul>
940 <li>The SPARC backend only supports the 32-bit SPARC ABI (-m32); it does not
941     support the 64-bit SPARC ABI (-m64).</li>
942 </ul>
943
944 </div>
945
946 <!-- ======================================================================= -->
947 <div class="doc_subsection">
948   <a name="mips-be">Known problems with the MIPS back-end</a>
949 </div>
950
951 <div class="doc_text">
952
953 <ul>
954 <li>64-bit MIPS targets are not supported yet.</li>
955 </ul>
956
957 </div>
958
959 <!-- ======================================================================= -->
960 <div class="doc_subsection">
961   <a name="alpha-be">Known problems with the Alpha back-end</a>
962 </div>
963
964 <div class="doc_text">
965
966 <ul>
967
968 <li>On 21164s, some rare FP arithmetic sequences which may trap do not have the
969 appropriate nops inserted to ensure restartability.</li>
970
971 </ul>
972 </div>
973
974 <!-- ======================================================================= -->
975 <div class="doc_subsection">
976   <a name="c-be">Known problems with the C back-end</a>
977 </div>
978
979 <div class="doc_text">
980
981 <ul>
982 <li><a href="http://llvm.org/PR802">The C backend has only basic support for
983     inline assembly code</a>.</li>
984 <li><a href="http://llvm.org/PR1658">The C backend violates the ABI of common
985     C++ programs</a>, preventing intermixing between C++ compiled by the CBE and
986     C++ code compiled with <tt>llc</tt> or native compilers.</li>
987 <li>The C backend does not support all exception handling constructs.</li>
988 <li>The C backend does not support arbitrary precision integers.</li>
989 </ul>
990
991 </div>
992
993
994 <!-- ======================================================================= -->
995 <div class="doc_subsection">
996   <a name="c-fe">Known problems with the llvm-gcc C and C++ front-end</a>
997 </div>
998
999 <div class="doc_text">
1000
1001 <p>The only major language feature of GCC not supported by llvm-gcc is
1002     the <tt>__builtin_apply</tt> family of builtins.   However, some extensions
1003     are only supported on some targets.  For example, trampolines are only
1004     supported on some targets (these are used when you take the address of a
1005     nested function).</p>
1006
1007 <p>If you run into GCC extensions which are not supported, please let us know.
1008 </p>
1009
1010 </div>
1011
1012 <!-- ======================================================================= -->
1013 <div class="doc_subsection">
1014   <a name="fortran-fe">Known problems with the llvm-gcc Fortran front-end</a>
1015 </div>
1016
1017 <div class="doc_text">
1018 <ul>
1019 <li>Fortran support generally works, but there are still several unresolved bugs
1020     in <a href="http://llvm.org/bugs/">Bugzilla</a>.  Please see the
1021     tools/gfortran component for details.</li>
1022 </ul>
1023 </div>
1024
1025 <!-- ======================================================================= -->
1026 <div class="doc_subsection">
1027   <a name="ada-fe">Known problems with the llvm-gcc Ada front-end</a>
1028 </div>
1029
1030 <div class="doc_text">
1031 The llvm-gcc 4.2 Ada compiler works fairly well; however, this is not a mature
1032 technology, and problems should be expected.
1033 <ul>
1034 <li>The Ada front-end currently only builds on X86-32.  This is mainly due
1035 to lack of trampoline support (pointers to nested functions) on other platforms.
1036 However, it <a href="http://llvm.org/PR2006">also fails to build on X86-64</a>
1037 which does support trampolines.</li>
1038 <li>The Ada front-end <a href="http://llvm.org/PR2007">fails to bootstrap</a>.
1039 This is due to lack of LLVM support for <tt>setjmp</tt>/<tt>longjmp</tt> style
1040 exception handling, which is used internally by the compiler.
1041 Workaround: configure with <tt>--disable-bootstrap</tt>.</li>
1042 <li>The c380004, <a href="http://llvm.org/PR2010">c393010</a>
1043 and <a href="http://llvm.org/PR2421">cxg2021</a> ACATS tests fail
1044 (c380004 also fails with gcc-4.2 mainline).
1045 If the compiler is built with checks disabled then <a href="http://llvm.org/PR2010">c393010</a>
1046 causes the compiler to go into an infinite loop, using up all system memory.</li>
1047 <li>Some GCC specific Ada tests continue to crash the compiler.</li>
1048 <li>The <tt>-E</tt> binder option (exception backtraces)
1049 <a href="http://llvm.org/PR1982">does not work</a> and will result in programs
1050 crashing if an exception is raised.  Workaround: do not use <tt>-E</tt>.</li>
1051 <li>Only discrete types <a href="http://llvm.org/PR1981">are allowed to start
1052 or finish at a non-byte offset</a> in a record.  Workaround: do not pack records
1053 or use representation clauses that result in a field of a non-discrete type
1054 starting or finishing in the middle of a byte.</li>
1055 <li>The <tt>lli</tt> interpreter <a href="http://llvm.org/PR2009">considers
1056 'main' as generated by the Ada binder to be invalid</a>.
1057 Workaround: hand edit the file to use pointers for <tt>argv</tt> and
1058 <tt>envp</tt> rather than integers.</li>
1059 <li>The <tt>-fstack-check</tt> option <a href="http://llvm.org/PR2008">is
1060 ignored</a>.</li>
1061 </ul>
1062 </div>
1063
1064 <!-- *********************************************************************** -->
1065 <div class="doc_section">
1066   <a name="additionalinfo">Additional Information</a>
1067 </div>
1068 <!-- *********************************************************************** -->
1069
1070 <div class="doc_text">
1071
1072 <p>A wide variety of additional information is available on the <a
1073 href="http://llvm.org">LLVM web page</a>, in particular in the <a
1074 href="http://llvm.org/docs/">documentation</a> section.  The web page also
1075 contains versions of the API documentation which is up-to-date with the
1076 Subversion version of the source code.
1077 You can access versions of these documents specific to this release by going
1078 into the "<tt>llvm/doc/</tt>" directory in the LLVM tree.</p>
1079
1080 <p>If you have any questions or comments about LLVM, please feel free to contact
1081 us via the <a href="http://llvm.org/docs/#maillist"> mailing
1082 lists</a>.</p>
1083
1084 </div>
1085
1086 <!-- *********************************************************************** -->
1087
1088 <hr>
1089 <address>
1090   <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
1091   src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS"></a>
1092   <a href="http://validator.w3.org/check/referer"><img
1093   src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"></a>
1094
1095   <a href="http://llvm.org/">LLVM Compiler Infrastructure</a><br>
1096   Last modified: $Date$
1097 </address>
1098
1099 </body>
1100 </html>