X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FReleaseNotes.html;h=d38b95e81c18695c678b67bb93b246003f7d7167;hb=f7fea72e16683b0d08aa1805bf61bf5a471d7e85;hp=fc31ea98bce9cb37470320b49bd929afd8917359;hpb=62f009af414c6dd448637cdaeb5d3f4c5804d94e;p=oota-llvm.git diff --git a/docs/ReleaseNotes.html b/docs/ReleaseNotes.html index fc31ea98bce..d38b95e81c1 100644 --- a/docs/ReleaseNotes.html +++ b/docs/ReleaseNotes.html @@ -45,7 +45,8 @@ Release Notes.
This document contains the release notes for the LLVM Compiler Infrastructure, release 3.0. Here we describe the status of LLVM, including - major improvements from the previous release and significant known problems. + major improvements from the previous release, improvements in various + subprojects of LLVM, and some of the current users of the code. All LLVM releases may be downloaded from the LLVM releases web site.
@@ -61,16 +62,8 @@ Release Notes. releases page. - - - + +In the LLVM 3.0 time-frame, the Clang team has made many improvements:
If Clang rejects your code but another compiler accepts it, please take a look at the language compatibility guide to make sure this is not intentional or a known @@ -153,6 +166,7 @@ Release Notes.
The 3.0 release has the following notable changes:
+In the LLVM 3.0 timeframe,
+In the LLVM 3.0 timeframe, the target specific ARM code has converted to + "unified" assembly syntax, and several new functions have been added to the + library.
@@ -202,6 +214,11 @@ Release Notes.LLDB is a ground-up implementation of a command line debugger, as well as a + debugger API that can be used from other applications. LLDB makes use of the + Clang parser to provide high-fidelity expression parsing (particularly for + C++) and uses the LLVM JIT for target support.
+LLDB has advanced by leaps and bounds in the 3.0 timeframe. It is dramatically more stable and useful, and includes both a new tutorial and @@ -221,22 +238,8 @@ Release Notes. licensed under the MIT and UIUC license, allowing it to be used more permissively.
-- LLBrowse is an interactive viewer for LLVM modules. It can load any LLVM - module and displays its contents as an expandable tree view, facilitating an - easy way to inspect types, functions, global variables, or metadata nodes. It - is fully cross-platform, being based on the popular wxWidgets GUI - toolkit.
+Libc++ has been ported to FreeBSD and imported into the base system. It is + planned to be the default STL implementation for FreeBSD 10.
+ LLBrowse is an interactive viewer for LLVM modules. It can load any LLVM + module and displays its contents as an expandable tree view, facilitating an + easy way to inspect types, functions, global variables, or metadata nodes. It + is fully cross-platform, being based on the popular wxWidgets GUI + toolkit.
+ +AddressSanitizer @@ -323,7 +343,7 @@ be used to verify some algorithms.
Clam AntiVirus is an open source (GPL) @@ -332,9 +352,8 @@ be used to verify some algorithms.
Since version 0.96 it has bytecode - signatures that allow writing detections for complex malware.
- -It uses LLVM's JIT to speed up the execution of bytecode on X86, X86-64, + signatures that allow writing detections for complex malware. + It uses LLVM's JIT to speed up the execution of bytecode on X86, X86-64, PPC32/64, falling back to its own interpreter otherwise. The git version was updated to work with LLVM 3.0.
@@ -372,8 +391,8 @@ be used to verify some algorithms.Cling is an interactive compiler interface - (aka C++ interpreter). It uses LLVM's JIT and clang; it currently supports - C++ and C. It has a prompt interface, runs source files, calls into shared + (aka C++ interpreter). It supports C++ and C, and uses LLVM's JIT and the + Clang parser. It has a prompt interface, runs source files, calls into shared libraries, prints the value of expressions, even does runtime lookup of identifiers (dynamic scopes). And it just behaves like one would expect from an interpreter.
@@ -392,10 +411,10 @@ be used to verify some algorithms. typing.Eero is a fully @@ -409,9 +428,24 @@ be used to verify some algorithms.
FAUST is a compiled language for + real-time audio signal processing. The name FAUST stands for Functional + AUdio STream. Its programming model combines two approaches: functional + programming and block diagram composition. In addition with the C, C++, Java + output formats, the Faust compiler can now generate LLVM bitcode, and works + with LLVM 2.7-3.0. +
+ +GHC is an open source, state-of-the-art programming suite for Haskell, a @@ -478,6 +512,22 @@ be used to verify some algorithms.
Julia is a high-level, + high-performance dynamic language for technical + computing. It provides a sophisticated compiler, distributed parallel + execution, numerical accuracy, and an extensive mathematical function + library. The compiler uses type inference to generate fast code + without any type declarations, and uses LLVM's optimization passes and + JIT compiler. The language is designed around multiple dispatch, + giving programs a large degree of flexibility. It is ready for use on many + kinds of problems.
+Note that we use a Git mirror of LLVM with some patches. See: - https://github.com/mono/llvm
+Note that we use a Git mirror of LLVM with some patches.
Pure is an algebraic/functional programming language based on term rewriting. Programs @@ -564,7 +614,7 @@ be used to verify some algorithms. languages (including the ability to load LLVM bitcode modules, and inline C, C++, Fortran and Faust code in Pure programs if the corresponding LLVM-enabled compilers are installed).
- +Pure version 0.48 has been tested and is known to work with LLVM 3.0 (and continues to work with older LLVM releases >= 2.5).
@@ -625,7 +675,7 @@ be used to verify some algorithms. co-design flow from C/C++ programs down to synthesizable VHDL and parallel program binaries. Processor customization points include the register files, function units, supported operations, and the interconnection network. - +TCE uses Clang and LLVM for C/C++ language support, target independent optimizations and also for parts of code generation. It generates new LLVM-based code generators "on the fly" for the designed TTA processors and @@ -633,7 +683,7 @@ be used to verify some algorithms. per-target recompilation of larger parts of the compiler chain.
ZooLib is Open Source under the MIT - License. It provides GUI, filesystem access, TCP networking, thread-safe - memory management, threading and locking for Mac OS X, Classic Mac OS, - Microsoft Windows, POSIX operating systems with X11, BeOS, Haiku, Apple's iOS - and Research in Motion's BlackBerry.
- -My current work is to use CLang's static analyzer to improve ZooLib's code - quality. I also plan to set up LLVM compiles of the demo programs and test - programs using CLang and LLVM on all the platforms that CLang, LLVM and - ZooLib all support.
- -llvm-gcc is gone
+ -LLVM 3.0 includes several major new capabilities:
- - - - - -LLVM 3.0 includes several major changes and big features:
+ +LLVM IR has several new features for better support of new targets and that expose new optimization opportunities:
-One of the biggest changes is that 3.0 has a new exception handling
- system. The old system used LLVM intrinsics to convey the exception handling
- information to the code generator. It worked in most cases, but not
- all. Inlining was especially difficult to get right. Also, the intrinsics
- could be moved away from the invoke
instruction, making it hard
- to recover that information.
The new EH system makes exception handling a first-class member of the IR. It - adds two new instructions:
- -landingpad
—
- this instruction defines a landing pad basic block. It contains all of the
- information that's needed by the code generator. It's also required to be
- the first non-PHI instruction in the landing pad. In addition, a landing
- pad may be jumped to only by the unwind edge of an invoke
- instruction.resume
— this
- instruction causes the current exception to resume traveling up the
- stack. It replaces the @llvm.eh.resume
intrinsic.Converting from the old EH API to the new EH API is rather simple, because a
- lot of complexity has been removed. The two intrinsics,
- @llvm.eh.exception
and @llvm.eh.selector
have been
- superceded by the landingpad
instruction. Instead of generating
- a call to @llvm.eh.exception
and @llvm.eh.selector
:
-
-
-Function *ExcIntr = Intrinsic::getDeclaration(TheModule, - Intrinsic::eh_exception); -Function *SlctrIntr = Intrinsic::getDeclaration(TheModule, - Intrinsic::eh_selector); - -// The exception pointer. -Value *ExnPtr = Builder.CreateCall(ExcIntr, "exc_ptr"); - -std::vector<Value*> Args; -Args.push_back(ExnPtr); -Args.push_back(Builder.CreateBitCast(Personality, - Type::getInt8PtrTy(Context))); - -// Add selector clauses to Args. - -// The selector call. -Builder.CreateCall(SlctrIntr, Args, "exc_sel"); --
You should instead generate a landingpad
instruction, that
- returns an exception object and selector value:
-LandingPadInst *LPadInst = - Builder.CreateLandingPad(StructType::get(Int8PtrTy, Int32Ty, NULL), - Personality, 0); - -Value *LPadExn = Builder.CreateExtractValue(LPadInst, 0); -Builder.CreateStore(LPadExn, getExceptionSlot()); - -Value *LPadSel = Builder.CreateExtractValue(LPadInst, 1); -Builder.CreateStore(LPadSel, getEHSelectorSlot()); --
It's now trivial to add the individual clauses to the landingpad
- instruction.
-// Adding a catch clause -Constant *TypeInfo = getTypeInfo(); -LPadInst->addClause(TypeInfo); - -// Adding a C++ catch-all -LPadInst->addClause(Constant::getNullValue(Builder.getInt8PtrTy())); - -// Adding a cleanup -LPadInst->setCleanup(true); - -// Adding a filter clause -std::vector<Constant*> TypeInfos; -Constant *TypeInfo = getFilterTypeInfo(); -TypeInfos.push_back(Builder.CreateBitCast(TypeInfo, Builder.getInt8PtrTy())); - -ArrayType *FilterTy = ArrayType::get(Int8PtrTy, TypeInfos.size()); -LPadInst->addClause(ConstantArray::get(FilterTy, TypeInfos)); --
Converting from using the @llvm.eh.resume
intrinsic to
- the resume
instruction is trivial. It takes the exception
- pointer and exception selector values returned by
- the landingpad
instruction:
-Type *UnwindDataTy = StructType::get(Builder.getInt8PtrTy(), - Builder.getInt32Ty(), NULL); -Value *UnwindData = UndefValue::get(UnwindDataTy); -Value *ExcPtr = Builder.CreateLoad(getExceptionObjSlot()); -Value *ExcSel = Builder.CreateLoad(getExceptionSelSlot()); -UnwindData = Builder.CreateInsertValue(UnwindData, ExcPtr, 0, "exc_ptr"); -UnwindData = Builder.CreateInsertValue(UnwindData, ExcSel, 1, "exc_sel"); -Builder.CreateResume(UnwindData); --
The induction variable simplification pass in 3.0 only modifies - induction variables when profitable. Sign and zero extension - elimination, linear function test replacement, loop unrolling, and - other simplifications that require induction variable analysis have - been generalized so they no longer require loops to be rewritten in a - typically suboptimal form prior to optimization. This new design - preserves more IR level information, avoids undoing earlier loop - optimizations (particularly hand-optimized loops), and no longer - strongly depends on the code generator rewriting loops a second time - in a now optimal form--an intractable problem.
- -The original behavior can be restored with -mllvm -enable-iv-rewrite; - however, support for this mode will be short lived. As such, bug - reports should be filed for any significant performance regressions - when moving from -mllvm -enable-iv-rewrite to the 3.0 default mode.
+In addition to a large array of minor performance tweaks and bug fixes, this +
In addition to many minor performance tweaks and bug fixes, this release includes a few major enhancements and additions to the optimizers:
__builtin_expect
calls. That information is currently used for
+ register spill placement and if-conversion, with additional optimizations
+ planned for future releases. The same framework is intended for eventual
+ use with profile-guided optimization.The LLVM Machine Code (aka MC) subsystem was created to solve a number of problems in the realm of assembly, disassembly, object file format handling, and a number of other related areas that CPU instruction-set level tools work - in.
+ in. For more information, please see + the Intro + to the LLVM MC Project Blog Post.For more information, please see - the Intro - to the LLVM MC Project Blog Post.
- @@ -953,9 +938,24 @@ Builder.CreateResume(UnwindData); make it run faster:getExecutionDomain
and setExecutionDomain
hooks
+ to use the pass.New features and major changes in the X86 target include:
@llvm.x86.sse42.crc32.[8|16|32]
- and @llvm.x86.sse42.crc64.[8|64]
. They have been renamed to
- @llvm.x86.sse42.crc32.32.[8|16|32]
and
- @llvm.x86.sse42.crc32.64.[8|64]
.-mavx
to the compiler. AVX2 implementation is
+ underway on mainline.@llvm.x86.sse42.crc32.[8|16|32]
+ and @llvm.x86.sse42.crc64.[8|64]
. They have been renamed to
+ @llvm.x86.sse42.crc32.32.[8|16|32]
and
+ @llvm.x86.sse42.crc32.64.[8|64]
.New features of the ARM target include:
New features and major changes in the MIPS target include:
+This release has seen major new work on just about every aspect of the MIPS + backend. Some of the major new features include:
The PTX back-end is still experimental, but is fairly usable for compute kernels in LLVM 3.0. Most scalar arithmetic is implemented, as well as intrinsics to access the special PTX registers and sync instructions. The major missing pieces are texture/sampler support and some vector operations.
- +That said, the backend is already being used for domain-specific languages and works well with the libclc library to supply OpenCL built-ins. With it, you can use Clang to compile @@ -1042,7 +1062,7 @@ Builder.CreateResume(UnwindData); blob using the nVidia OpenCL library. It has been tested with several OpenCL programs, including some from the nVidia GPU Computing SDK, and the performance is on par with the nVidia compiler.
- +PPC32/ELF va_arg was implemented.
-PPC32 initial support for .o file writing was implemented.
-MicroBlaze scheduling itineraries were added that model the
- 3-stage and the 5-stage pipeline architectures. The 3-stage
- pipeline model can be selected with -mcpu=mblaze3
- and the 5-stage pipeline model can be selected with
- -mcpu=mblaze5
.
-mcpu=mblaze3
+ and the 5-stage pipeline model can be selected with
+ -mcpu=mblaze5
.LLVMC
front end code was removed while separating
- out language independence.LowerSetJmp
pass wasn't used effectively by any
- target and has been removed.LLVMC
meta compiler driver was removed.TailDup
pass was not used in the standard pipeline
and was unable to update ssa form, so it has been removed.
load volatile
"/"store volatile
". The old
syntax ("volatile load
"/"volatile store
")
- is still accepted, but is now considered deprecated.llvm.memory.barrier
and
+ is still accepted, but is now considered deprecated and will be removed in
+ 3.1.llvm.memory.barrier
and
llvm.atomic.*
) are now gone. Please use the new atomic
instructions, described in the atomics guide.
+ PHINode::reserveOperandSpace
has been removed. Instead, you
must specify how many operands to reserve space for when you create the
PHINode, by passing an extra argument
@@ -1230,185 +1260,180 @@ Builder.CreateResume(UnwindData);
This section contains significant known problems with the LLVM system, listed - by component. If you run into a problem, please check - the LLVM bug database and submit a bug if - there isn't already one.
+LLVM is generally a production quality compiler, and is used by a broad range + of applications and shipping in many products. That said, not every + subsystem is as mature as the aggregate, particularly the more obscure + targets. If you run into a problem, please check the LLVM bug database and submit a bug if + there isn't already one or ask on the LLVMdev + list.
- -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.
+Known problem areas include:
A wide variety of additional information is available on + the LLVM web page, in particular in + the documentation section. The web page + also contains versions of the API documentation which is up-to-date with the + Subversion 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.
One of the biggest changes is that 3.0 has a new exception handling
+ system. The old system used LLVM intrinsics to convey the exception handling
+ information to the code generator. It worked in most cases, but not
+ all. Inlining was especially difficult to get right. Also, the intrinsics
+ could be moved away from the invoke
instruction, making it hard
+ to recover that information.
The new EH system makes exception handling a first-class member of the IR. It + adds two new instructions:
landingpad
—
+ this instruction defines a landing pad basic block. It contains all of the
+ information that's needed by the code generator. It's also required to be
+ the first non-PHI instruction in the landing pad. In addition, a landing
+ pad may be jumped to only by the unwind edge of an invoke
+ instruction.resume
— this
+ instruction causes the current exception to resume traveling up the
+ stack. It replaces the @llvm.eh.resume
intrinsic.Converting from the old EH API to the new EH API is rather simple, because a
+ lot of complexity has been removed. The two intrinsics,
+ @llvm.eh.exception
and @llvm.eh.selector
have been
+ superseded by the landingpad
instruction. Instead of generating
+ a call to @llvm.eh.exception
and @llvm.eh.selector
:
-
-
+Function *ExcIntr = Intrinsic::getDeclaration(TheModule, + Intrinsic::eh_exception); +Function *SlctrIntr = Intrinsic::getDeclaration(TheModule, + Intrinsic::eh_selector); -+// The exception pointer. +Value *ExnPtr = Builder.CreateCall(ExcIntr, "exc_ptr"); -- --
+std::vector<Value*> Args; +Args.push_back(ExnPtr); +Args.push_back(Builder.CreateBitCast(Personality, + Type::getInt8PtrTy(Context))); + +// Add selector clauses to Args. +// The selector call. +Builder.CreateCall(SlctrIntr, Args, "exc_sel"); +- 64-bit MIPS targets are not supported yet.
-- Known problems with the Alpha back-end -
+You should instead generate a
-landingpad
instruction, that + returns an exception object and selector value:++- -+LandingPadInst *LPadInst = + Builder.CreateLandingPad(StructType::get(Int8PtrTy, Int32Ty, NULL), + Personality, 0); --
+Value *LPadExn = Builder.CreateExtractValue(LPadInst, 0); +Builder.CreateStore(LPadExn, getExceptionSlot()); +Value *LPadSel = Builder.CreateExtractValue(LPadInst, 1); +Builder.CreateStore(LPadSel, getEHSelectorSlot()); +- On 21164s, some rare FP arithmetic sequences which may trap do not have - the appropriate nops inserted to ensure restartability.
-- Known problems with the C back-end -
- -- -The C backend has numerous problems and is not being actively maintained. - Depending on it for anything serious is not advised.
+It's now trivial to add the individual clauses to the
-landingpad
+ instruction.-
- The C backend has only basic support for - inline assembly code.
++++// Adding a catch clause +Constant *TypeInfo = getTypeInfo(); +LPadInst->addClause(TypeInfo); -- The C backend violates the ABI of common - C++ programs, preventing intermixing between C++ compiled by the CBE - and C++ code compiled with llc or native compilers.
+// Adding a C++ catch-all +LPadInst->addClause(Constant::getNullValue(Builder.getInt8PtrTy())); -- The C backend does not support all exception handling constructs.
+// Adding a cleanup +LPadInst->setCleanup(true); -- The C backend does not support arbitrary precision integers.
- +// Adding a filter clause +std::vector<Constant*> TypeInfos; +Constant *TypeInfo = getFilterTypeInfo(); +TypeInfos.push_back(Builder.CreateBitCast(TypeInfo, Builder.getInt8PtrTy())); +ArrayType *FilterTy = ArrayType::get(Int8PtrTy, TypeInfos.size()); +LPadInst->addClause(ConstantArray::get(FilterTy, TypeInfos)); +Converting from using the
+ +@llvm.eh.resume
intrinsic to + theresume
instruction is trivial. It takes the exception + pointer and exception selector values returned by + thelandingpad
instruction:+- -+Type *UnwindDataTy = StructType::get(Builder.getInt8PtrTy(), + Builder.getInt32Ty(), NULL); +Value *UnwindData = UndefValue::get(UnwindDataTy); +Value *ExcPtr = Builder.CreateLoad(getExceptionObjSlot()); +Value *ExcSel = Builder.CreateLoad(getExceptionSelSlot()); +UnwindData = Builder.CreateInsertValue(UnwindData, ExcPtr, 0, "exc_ptr"); +UnwindData = Builder.CreateInsertValue(UnwindData, ExcSel, 1, "exc_sel"); +Builder.CreateResume(UnwindData); +- Additional Information -
- --A wide variety of additional information is available on - the LLVM web page, in particular in - the documentation section. The web page - also contains versions of the API documentation which is up-to-date with the - Subversion 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.
+ --> -