This document contains the release notes for the LLVM compiler infrastructure, release 1.6. Here we describe the status of LLVM, including any known problems and major improvements from the previous release. The most up-to-date version of this document can be found on the LLVM 1.6 web site. If you are not reading this on the LLVM web pages, you should probably go there because this document may be updated after the release.
For more information about LLVM, including information about the latest release, please check out the main LLVM web site. If you have questions or comments, the LLVM developer's mailing list is a good place to send them.
Note that if you are reading this file from CVS or the main LLVM web page, this document applies to the next release, not the current one. To see the release notes for the current or previous releases, see the releases page.
This is the seventh public release of the LLVM Compiler Infrastructure. This release incorporates a large number of enhancements and additions (primarily in the code generator), which combine to improve the quality of the code generated by LLVM by up to 30% in some cases. This release is also the first release to have first-class support for Mac OS X: all of the major bugs have been shaken out and it is now as well supported as Linux on X86.
LLVM now includes support for auto-generating large portions of the instruction selectors from target descriptions. This allows us to write patterns in the target .td file, instead of writing lots of nasty C++ code. Most of the PowerPC instruction selector is now generated from the PowerPC target description files and other targets are adding support that will be live for LLVM 1.7.
For example, here are some patterns used by the PowerPC backend. A floating-point multiply then subtract instruction (FMSUBS):
(set F4RC:$FRT, (fsub (fmul F4RC:$FRA, F4RC:$FRC), F4RC:$FRB))
Exclusive-or by 16-bit immediate (XORI):
(set GPRC:$dst, (xor GPRC:$src1, immZExt16:$src2))
Exclusive-or by 16-bit immediate shifted right 16-bits (XORIS):
(set GPRC:$dst, (xor GPRC:$src1, imm16Shifted:$src2))
With these definitions, we teach the code generator how to combine these two instructions to xor an abitrary 32-bit immediate with the following definition. The first line specifies what to match (a xor with an arbitrary immediate) the second line specifies what to produce:
def : Pat<(xor GPRC:$in, imm:$imm), (XORIS (XORI GPRC:$in, (LO16 imm:$imm)), (HI16 imm:$imm))>;
Instruction selectors using the refined instruction selection framework can now use a simple pre-pass scheduler included with LLVM 1.6. This scheduler is currently simple (cannot be configured much by the targets), but will be extended in the future.
It is now straight-forward to parameterize a target implementation, and provide a mapping from CPU names to sets of target parameters. LLC now supports a -mcpu=cpu option that lets you choose a subtarget by CPU name: use "llvm-as < /dev/null | llc -march=XXX -mcpu=help" to get a list of supported CPUs for target "XXX". It also provides a -mattr=+attr1,-attr2 option that can be used to control individual features of a target (the previous command will list available features as well).
This functionality is nice when you want tell LLC something like "compile to code that is specialized for the PowerPC G5, but doesn't use altivec code. In this case, using "llc -march=ppc32 -mcpu=g5 -mattr=-altivec".
LLVM is known to work on the following platforms:
The core LLVM infrastructure uses GNU autoconf to adapt itself to the machine and operating system on which it is built. However, minor porting may be required to get LLVM to work on new platforms. We welcome your portability patches and reports of successful builds or error messages.
This section contains all known problems with the LLVM system, listed by component. As new problems are discovered, they will be added to these sections. If you run into a problem, please check the LLVM bug database and submit a bug if there isn't already one.
The following components of this LLVM release are either untested, known to be broken or unreliable, or are in early development. These components should not be relied on, and bugs should not be filed against them, but they may be useful to some people. In particular, if you would like to work on one of these components, please contact us on the llvmdev list.
for (i = 0; i != 1000000; ++i) { int X[n]; foo(X); }
The following GCC extensions are partially supported. An ignored attribute means that the LLVM compiler ignores the presence of the attribute, but the code should still work. An unsupported attribute is one which is ignored by the LLVM compiler and will cause a different interpretation of the program.
The following extensions are known to be supported:
typeof
: referring to the type of an expression.?:
, ",
" and casts in lvalues.?:
expression.void
-pointers and function pointers.\e
stands for the character <ESC>.__const__
, __asm__
, etc., for header files.enum foo;
, with details to follow.If you run into GCC extensions which have not been included in any of these lists, please let us know (also including whether or not they work).
For this release, the C++ front-end is considered to be fully tested and works for a number of non-trivial programs, including LLVM itself.
A wide variety of additional information is available on the LLVM web page, including documentation and publications describing algorithms and components implemented in LLVM. The web page also contains versions of the API documentation which is up-to-date with the CVS version of the source code. You can access versions of these documents specific to this release by going into the "llvm/doc/" directory in the LLVM tree.
If you have any questions or comments about LLVM, please feel free to contact us via the mailing lists.