1 ========================
2 LLVM 7.0.0 Release Notes
3 ========================
9 These are in-progress notes for the upcoming LLVM 7 release.
10 Release notes for previous releases can be found on
11 `the Download Page <http://releases.llvm.org/download.html>`_.
17 This document contains the release notes for the LLVM Compiler Infrastructure,
18 release 7.0.0. Here we describe the status of LLVM, including major improvements
19 from the previous release, improvements in various subprojects of LLVM, and
20 some of the current users of the code. All LLVM releases may be downloaded
21 from the `LLVM releases web site <http://llvm.org/releases/>`_.
23 For more information about LLVM, including information about the latest
24 release, please check out the `main LLVM web site <http://llvm.org/>`_. If you
25 have questions or comments, the `LLVM Developer's Mailing List
26 <http://lists.llvm.org/mailman/listinfo/llvm-dev>`_ is a good place to send
29 Note that if you are reading this file from a Subversion checkout or the main
30 LLVM web page, this document applies to the *next* release, not the current
31 one. To see the release notes for a specific release, please see the `releases
32 page <http://llvm.org/releases/>`_.
34 Non-comprehensive list of changes in this release
35 =================================================
37 For small 1-3 sentence descriptions, just add an entry at the end of
38 this list. If your description won't fit comfortably in one bullet
39 point (e.g. maybe you would like to give an example of the
40 functionality, or simply have a lot to talk about), see the `NOTE` below
41 for adding a new subsection.
43 * Libraries have been renamed from 7.0 to 7. This change also impacts
44 downstream libraries like lldb.
46 * The LoopInstSimplify pass (-loop-instsimplify) has been removed.
48 * Symbols starting with ``?`` are no longer mangled by LLVM when using the
49 Windows ``x`` or ``w`` IR mangling schemes.
51 * A new tool named :doc:`llvm-exegesis <CommandGuide/llvm-exegesis>` has been
52 added. :program:`llvm-exegesis` automatically measures instruction scheduling
53 properties (latency/uops) and provides a principled way to edit scheduling
56 * A new tool named :doc:`llvm-mca <CommandGuide/llvm-mca>` has been added.
57 :program:`llvm-mca` is a static performance analysis tool that uses
58 information available in LLVM to statically predict the performance of
59 machine code for a specific CPU.
61 * The optimization flag to merge constants (-fmerge-all-constants) is no longer
64 * Optimization of floating-point casts is improved. This may cause surprising
65 results for code that is relying on the undefined behavior of overflowing
66 casts. The optimization can be disabled by specifying a function attribute:
67 "strict-float-cast-overflow"="false". This attribute may be created by the
68 clang option ``-fno-strict-float-cast-overflow``.
69 Code sanitizers can be used to detect affected patterns. The option for
70 detecting this problem alone is "-fsanitize=float-cast-overflow":
75 float x = 4294967296.0f;
77 printf("junk in the ftrunc: %f\n", x);
83 clang -O1 ftrunc.c -fsanitize=float-cast-overflow ; ./a.out
84 ftrunc.c:5:15: runtime error: 4.29497e+09 is outside the range of representable values of type 'int'
85 junk in the ftrunc: 0.000000
87 * ``LLVM_ON_WIN32`` is no longer set by ``llvm/Config/config.h`` and
88 ``llvm/Config/llvm-config.h``. If you used this macro, use the compiler-set
89 ``_WIN32`` instead which is set exactly when ``LLVM_ON_WIN32`` used to be set.
91 * The ``DEBUG`` macro has been renamed to ``LLVM_DEBUG``, the interface remains
92 the same. If you used this macro you need to migrate to the new one.
93 You should also clang-format your code to make it easier to integrate future
94 changes locally. This can be done with the following bash commands:
98 git grep -l 'DEBUG' | xargs perl -pi -e 's/\bDEBUG\s?\(/LLVM_DEBUG(/g'
99 git diff -U0 master | ../clang/tools/clang-format/clang-format-diff.py -i -p1 -style LLVM
101 * Early support for UBsan, X-Ray instrumentation and libFuzzer (x86 and x86_64) for OpenBSD. Support for MSan
102 (x86_64), X-Ray instrumentation and libFuzzer (x86 and x86_64) for FreeBSD.
104 * ``SmallVector<T, 0>`` shrank from ``sizeof(void*) * 4 + sizeof(T)`` to
105 ``sizeof(void*) + sizeof(unsigned) * 2``, smaller than ``std::vector<T>`` on
106 64-bit platforms. The maximum capacity is now restricted to ``UINT32_MAX``.
107 Since SmallVector doesn't have the exception-safety pessimizations some
108 implementations saddle std::vector with and is better at using ``realloc``,
109 it's now a better choice even on the heap (although when TinyPtrVector works,
115 If you would like to document a larger change, then you can add a
116 subsection about it right here. You can copy the following boilerplate
117 and un-indent it (the indentation causes it to be inside this comment).
122 Makes programs 10x faster by doing Special New Thing.
124 Changes to the LLVM IR
125 ----------------------
127 * The signatures for the builtins @llvm.memcpy, @llvm.memmove, and @llvm.memset
128 have changed. Alignment is no longer an argument, and are instead conveyed as
129 parameter attributes.
131 * invariant.group.barrier has been renamed to launder.invariant.group.
133 * invariant.group metadata can now refer only empty metadata nodes.
135 Changes to the ARM Backend
136 --------------------------
138 During this release ...
141 Changes to the MIPS Target
142 --------------------------
144 During this release ...
147 Changes to the PowerPC Target
148 -----------------------------
150 During this release ...
152 Changes to the X86 Target
153 -------------------------
155 During this release ...
157 Changes to the AMDGPU Target
158 -----------------------------
160 During this release ...
162 Changes to the AVR Target
163 -----------------------------
165 During this release ...
167 Changes to the OCaml bindings
168 -----------------------------
170 * Remove ``add_bb_vectorize``.
176 * Remove ``LLVMAddBBVectorizePass``. The implementation was removed and the C
177 interface was made a deprecated no-op in LLVM 5. Use
178 ``LLVMAddSLPVectorizePass`` instead to get the supported SLP vectorizer.
180 Changes to the DAG infrastructure
181 ---------------------------------
182 * ADDC/ADDE/SUBC/SUBE are now deprecated and will default to expand. Backends
183 that wish to continue to use these opcodes should explicitely request so
184 using ``setOperationAction`` in their ``TargetLowering``. New backends
185 should use UADDO/ADDCARRY/USUBO/SUBCARRY instead of the deprecated opcodes.
187 * The SETCCE opcode has now been removed in favor of SETCCCARRY.
189 External Open Source Projects Using LLVM 7
190 ==========================================
195 Additional Information
196 ======================
198 A wide variety of additional information is available on the `LLVM web page
199 <http://llvm.org/>`_, in particular in the `documentation
200 <http://llvm.org/docs/>`_ section. The web page also contains versions of the
201 API documentation which is up-to-date with the Subversion version of the source
202 code. You can access versions of these documents specific to this release by
203 going into the ``llvm/docs/`` directory in the LLVM tree.
205 If you have any questions or comments about LLVM, please feel free to contact
206 us via the `mailing lists <http://llvm.org/docs/#maillist>`_.