Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Merge LLVM's release_60 branch and a cherry-pick #108

Merged
merged 41 commits into from
Mar 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
e966768
Merging r324772:
zmodem Feb 12, 2018
663ef77
Merging r324746:
zmodem Feb 13, 2018
10dd7c8
Merging r324449:
rnk Feb 14, 2018
ca89cbe
Merging r324645:
rnk Feb 14, 2018
1d4c94e
Merging r325049:
rnk Feb 14, 2018
b02bf02
Merging r325085:
rnk Feb 14, 2018
0bd30ee
Merging r324497:
zmodem Feb 14, 2018
2955450
Merging r324576:
zmodem Feb 14, 2018
2192111
Merging r324962: (only the first hunk; see PR36375)
zmodem Feb 14, 2018
3af8845
Revert r320917 for PR36357
zmodem Feb 14, 2018
a1b3df3
Revert r319778 (and r319911) due to PR36357
zmodem Feb 14, 2018
08f6e35
Merging r325139:
zmodem Feb 16, 2018
75d86fd
Merging r324353:
zmodem Feb 19, 2018
c3ab0c1
Merging r325168:
zmodem Feb 19, 2018
359e6a4
Merging r325148:
zmodem Feb 19, 2018
e0d9119
Merging r324916:
zmodem Feb 19, 2018
71667f5
Merging r324195:
zmodem Feb 19, 2018
3a4f297
Merging r324110:
zmodem Feb 20, 2018
b99df1f
Merging r325463:
zmodem Feb 20, 2018
22a047b
Merging r325550:
zmodem Feb 20, 2018
2e49864
Merging r325525:
zmodem Feb 20, 2018
28b2241
[AArch64][GlobalISel] Support G_INSERT/G_EXTRACT of types < s32 bits.
zmodem Feb 21, 2018
06b82dc
ReleaseNotes: mention NetBSD support for sanitizers
zmodem Feb 21, 2018
edd4683
Merging r325654:
zmodem Feb 21, 2018
e64cc93
[ReleaseNotes] Initial release notes for X86 target.
topperc Feb 21, 2018
a1f4098
Merging r325739:
zmodem Feb 22, 2018
5d413c4
Merging r325687:
zmodem Feb 22, 2018
7449cdd
ReleaseNotes: The fast-math-flags changes
zmodem Feb 22, 2018
78c90d9
docs: remove in-progress warnings
zmodem Feb 22, 2018
4cc9e1d
[mips] 6.0 Release notes
Feb 23, 2018
72d068a
Merging r325894:
zmodem Feb 23, 2018
16ebb58
[ReleaseNotes] More X86 updates
topperc Feb 23, 2018
c93e390
Fix an unused variable warning in non-assert builds
zmodem Feb 26, 2018
fde9f20
Merging r325946:
zmodem Feb 26, 2018
2e75b54
Sphinx: fix 'Inline emphasis start-string without end-string'
zmodem Feb 27, 2018
138d74f
ReleaseNotes: tidy up
zmodem Feb 27, 2018
1a42764
Merging r326393:
zmodem Mar 1, 2018
dc906ab
Add some minimal release notes for retpoline support.
chandlerc Mar 2, 2018
089d4c0
ReleaseNotes: move the retpoline bullet higher
zmodem Mar 2, 2018
5f6a0da
Merge remote-tracking branch 'llvm-mirror/release_60' into rust-llvm-…
alexcrichton Mar 6, 2018
aa5b816
[DebugInfo] Discard invalid DBG_VALUE instructions in LiveDebugVariables
bjope Mar 6, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions bindings/go/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,11 @@ CGO_CPPFLAGS, CGO_CXXFLAGS and CGO_LDFLAGS environment variables:
$ export CGO_CXXFLAGS=-std=c++11
$ export CGO_LDFLAGS="`/path/to/llvm-build/bin/llvm-config --ldflags --libs --system-libs all`"
$ go build -tags byollvm

If you see a compilation error while compiling your code with Go 1.9.4 or later as follows,

go build llvm.org/llvm/bindings/go/llvm: invalid flag in #cgo LDFLAGS: -Wl,-headerpad_max_install_names

you need to setup $CGO_LDFLAGS_ALLOW to allow a compiler to specify some linker options:

$ export CGO_LDFLAGS_ALLOW='-Wl,(-search_paths_first|-headerpad_max_install_names)'
173 changes: 104 additions & 69 deletions docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ LLVM 6.0.0 Release Notes
.. contents::
:local:

.. warning::
These are in-progress notes for the upcoming LLVM 6 release.
Release notes for previous releases can be found on
`the Download Page <http://releases.llvm.org/download.html>`_.


Introduction
============

Expand All @@ -26,19 +20,14 @@ have questions or comments, the `LLVM Developer's Mailing List
<http://lists.llvm.org/mailman/listinfo/llvm-dev>`_ is a good place to send
them.

Note that if you are reading this file from a Subversion checkout or the main
LLVM web page, this document applies to the *next* release, not the current
one. To see the release notes for a specific release, please see the `releases
page <http://llvm.org/releases/>`_.

Non-comprehensive list of changes in this release
=================================================
.. NOTE
For small 1-3 sentence descriptions, just add an entry at the end of
this list. If your description won't fit comfortably in one bullet
point (e.g. maybe you would like to give an example of the
functionality, or simply have a lot to talk about), see the `NOTE` below
for adding a new subsection.

* Support for `retpolines <https://support.google.com/faqs/answer/7625886>`_
was added to help mitigate "branch target injection" (variant #2) of the
"Spectre" speculative side channels described by `Project Zero
<https://googleprojectzero.blogspot.com/2018/01/reading-privileged-memory-with-side.html>`_
and the `Spectre paper <https://spectreattack.com/spectre.pdf>`_.

* The ``Redirects`` argument of ``llvm::sys::ExecuteAndWait`` and
``llvm::sys::ExecuteNoWait`` was changed to an ``ArrayRef`` of optional
Expand All @@ -56,34 +45,33 @@ Non-comprehensive list of changes in this release

* Significantly improved quality of CodeView debug info for Windows.

* Note..
* Preliminary support for Sanitizers and sibling features on X86(_64) NetBSD
(ASan, UBsan, TSan, MSan, SafeStack, libFuzzer).

.. NOTE
If you would like to document a larger change, then you can add a
subsection about it right here. You can copy the following boilerplate
and un-indent it (the indentation causes it to be inside this comment).

Special New Feature
-------------------

Makes programs 10x faster by doing Special New Thing.

Changes to the LLVM IR
----------------------

* The fast-math-flags (FMF) have been updated. Previously, the 'fast' flag
indicated that floating-point reassociation was allowed and all other flags
were set too. The 'fast' flag still exists, but there is a new flag called
'reassoc' to indicate specifically that reassociation is allowed. A new bit
called 'afn' was also added to selectively allow approximations for common
mathlib functions like square-root. The new flags provide more flexibility
to enable/disable specific floating-point optimizations. Making the
optimizer respond appropriately to these flags is an ongoing effort.


Changes to the AArch64 Target
-----------------------------

During this release:
* Enabled the new GlobalISel instruction selection framework by default at ``-O0``.

* Enabled the new GlobalISel instruction selection framework by default at ``-O0``.

Changes to the ARM Target
-------------------------

During this release the ARM target has:

* Got support for enabling SjLj exception handling on platforms where it
* Support for enabling SjLj exception handling on platforms where it
isn't the default.


Expand All @@ -92,12 +80,12 @@ Changes to the Hexagon Target

* The Hexagon backend now supports V65 ISA.

* The ``-mhvx`` option now takes an optional value that specified the ISA
* The ``-mhvx`` option now takes an optional value that specifies the ISA
version of the HVX coprocessor. The available values are v60, v62 and v65.
By default, the value is set to be the same as the CPU version.

* The compiler option ``-mhvx-double`` is deprecated and will be removed in
the next release of the compiler. Programmers should use ``-mhvx-length``
the next release of the compiler. Programmers should use the ``-mhvx-length``
option to specify the desired vector length: ``-mhvx-length=64b`` for
64-byte vectors and ``-mhvx-length=128b`` for 128-byte vectors. While the
current default vector length is 64 bytes, users should always specify the
Expand All @@ -112,14 +100,46 @@ Changes to the Hexagon Target
Changes to the MIPS Target
--------------------------

During this release ...
Fixed numerous bugs:

* fpowi on MIPS64 giving incorrect results when used with a negative integer.
* Usage of the asm 'c' constraint with the wrong datatype causing an
assert/crash.
* Fixed a conversion bug when using the DSP ASE.
* Fixed an inconsistency where objects were not marked as using the microMIPS as
when the micromips function attribute or the ".set micromips" directive was
used.
* Reordered the MIPSR6 specific hazard scheduler pass to after the delay slot
filler, fixing a class of rare edge case bugs where the delay slot filler
would violate ISA restrictions.
* Fixed a crash when using a type of unknown size with gp relative addressing.
* Corrected the j macro for microMIPS.
* Corrected the encoding of movep for microMIPS32r6.
* Fixed an issue with the usage of insert instructions having an invalid set of
operands.
* Fixed an issue where TLS symbols were not marked as such.
* Enabled the usage of register scavenging with MSA, due to its shorter offsets
for loads and stores.
* Corrected the ELF headers when using the DSP ASE.

New features:

* The long branch pass now generates some R6 specific instructions when
targeting MIPSR6.
* The delay slot filler now performs more branch conversions if delay slots
cannot be filled.
* The MIPS MT ASE is now fully supported.
* Added support for the ``lapc`` pseudo instruction.
* Improved the selection of multiple instructions (``dext``, ``nmadd``,
``nmsub``).
* Further improved microMIPS codesize reduction.

Deprecation notices:

* microMIPS64R6 support was been deprecated since 5.0, and has now been
completely removed.


Changes to the PowerPC Target
-----------------------------

During this release ...

Changes to the SystemZ Target
-----------------------------

Expand All @@ -132,36 +152,66 @@ During this release the SystemZ target has:
Changes to the X86 Target
-------------------------

During this release ...
During this release the X86 target has:

* Got support for enabling SjLj exception handling on platforms where it
* Added support for enabling SjLj exception handling on platforms where it
isn't the default.

Changes to the AMDGPU Target
-----------------------------
* Added intrinsics for Intel Extensions: VAES, GFNI, VPCLMULQDQ, AVX512VBMI2, AVX512BITALG, AVX512VNNI.

During this release ...
* Added support for Intel Icelake CPU.

Changes to the AVR Target
-----------------------------
* Fixed some X87 codegen bugs.

During this release ...
* Added instruction scheduling information for Intel Sandy Bridge, Ivy Bridge, Haswell, Broadwell, and Skylake CPUs.

Changes to the OCaml bindings
-----------------------------
* Improved scheduler model for AMD Jaguar CPUs.

* Improved llvm-mc's disassembler for some EVEX encoded instructions.

* Add support for i8 and i16 vector signed/unsigned min/max horizontal reductions.

* Improved codegen for memory comparisons

* Improved codegen for i32 vector multiplies

* Improved codegen for scalar integer absolute values

* Improved codegen for vector integer rotations (XOP and AVX512)

During this release ...
* Improved codegen of data being transferred between GPRs and K-registers.

* Improved codegen for vector truncations.

Changes to the C API
--------------------
* Improved folding of address computations into gather/scatter instructions.

During this release ...
* Gained initial support recognizing variable shuffles from vector element extracts and inserts.

* Improved documentation for SSE/AVX intrinsics in intrin.h header files.

* Gained support for emitting `retpolines
<https://support.google.com/faqs/answer/7625886>`_, including automatic
insertion of the necessary thunks or using external thunks.


External Open Source Projects Using LLVM 6
==========================================

LDC - the LLVM-based D compiler
-------------------------------

`D <http://dlang.org>`_ is a language with C-like syntax and static typing. It
pragmatically combines efficiency, control, and modeling power, with safety and
programmer productivity. D supports powerful concepts like Compile-Time Function
Execution (CTFE) and Template Meta-Programming, provides an innovative approach
to concurrency and offers many classical paradigms.

`LDC <http://wiki.dlang.org/LDC>`_ uses the frontend from the reference compiler
combined with LLVM as backend to produce efficient native code. LDC targets
x86/x86_64 systems like Linux, OS X, FreeBSD and Windows and also Linux on ARM
and PowerPC (32/64 bit). Ports to other architectures like AArch64 and MIPS64
are underway.

JFS - JIT Fuzzing Solver
------------------------

Expand All @@ -188,21 +238,6 @@ import of .h symbols - even inline functions and macros. Zig uses LLD combined
with lazily building compiler-rt to provide out-of-the-box cross-compiling for
all supported targets.

LDC - the LLVM-based D compiler
-------------------------------

`D <http://dlang.org>`_ is a language with C-like syntax and static typing. It
pragmatically combines efficiency, control, and modeling power, with safety and
programmer productivity. D supports powerful concepts like Compile-Time Function
Execution (CTFE) and Template Meta-Programming, provides an innovative approach
to concurrency and offers many classical paradigms.

`LDC <http://wiki.dlang.org/LDC>`_ uses the frontend from the reference compiler
combined with LLVM as backend to produce efficient native code. LDC targets
x86/x86_64 systems like Linux, OS X, FreeBSD and Windows and also Linux on ARM
and PowerPC (32/64 bit). Ports to other architectures like AArch64 and MIPS64
are underway.

Additional Information
======================

Expand Down
5 changes: 0 additions & 5 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
Overview
========

.. warning::

If you are using a released version of LLVM, see `the download page
<http://llvm.org/releases/>`_ to find your documentation.

The LLVM compiler infrastructure supports a wide range of projects, from
industrial strength compilers to specialized JIT applications to small
research projects.
Expand Down
14 changes: 14 additions & 0 deletions include/llvm/Bitcode/LLVMBitCodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,20 @@ enum OverflowingBinaryOperatorOptionalFlags {
OBO_NO_SIGNED_WRAP = 1
};

/// FastMath Flags
/// This is a fixed layout derived from the bitcode emitted by LLVM 5.0
/// intended to decouple the in-memory representation from the serialization.
enum FastMathMap {
UnsafeAlgebra = (1 << 0), // Legacy
NoNaNs = (1 << 1),
NoInfs = (1 << 2),
NoSignedZeros = (1 << 3),
AllowReciprocal = (1 << 4),
AllowContract = (1 << 5),
ApproxFunc = (1 << 6),
AllowReassoc = (1 << 7)
};

/// PossiblyExactOperatorOptionalFlags - Flags for serializing
/// PossiblyExactOperator's SubclassOptionalData contents.
enum PossiblyExactOperatorOptionalFlags { PEO_EXACT = 0 };
Expand Down
9 changes: 9 additions & 0 deletions include/llvm/IR/IntrinsicsX86.td
Original file line number Diff line number Diff line change
Expand Up @@ -3738,6 +3738,15 @@ let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.".
def int_x86_avx512_kxnor_w : // TODO: remove this intrinsic
Intrinsic<[llvm_i16_ty], [llvm_i16_ty, llvm_i16_ty],
[IntrNoMem]>;
def int_x86_avx512_kunpck_bw : GCCBuiltin<"__builtin_ia32_kunpckhi">,
Intrinsic<[llvm_i16_ty], [llvm_i16_ty, llvm_i16_ty],
[IntrNoMem]>;
def int_x86_avx512_kunpck_wd : GCCBuiltin<"__builtin_ia32_kunpcksi">,
Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty],
[IntrNoMem]>;
def int_x86_avx512_kunpck_dq : GCCBuiltin<"__builtin_ia32_kunpckdi">,
Intrinsic<[llvm_i64_ty], [llvm_i64_ty, llvm_i64_ty],
[IntrNoMem]>;
def int_x86_avx512_kortestz_w : GCCBuiltin<"__builtin_ia32_kortestzhi">,
Intrinsic<[llvm_i32_ty], [llvm_i16_ty, llvm_i16_ty],
[IntrNoMem]>;
Expand Down
38 changes: 38 additions & 0 deletions include/llvm/MC/MCAsmMacro.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
//===- MCAsmMacro.h - Assembly Macros ---------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_MC_MCASMMACRO_H
#define LLVM_MC_MCASMMACRO_H

#include "llvm/MC/MCParser/MCAsmLexer.h"

namespace llvm {

struct MCAsmMacroParameter {
StringRef Name;
std::vector<AsmToken> Value;
bool Required = false;
bool Vararg = false;

MCAsmMacroParameter() = default;
};

typedef std::vector<MCAsmMacroParameter> MCAsmMacroParameters;
struct MCAsmMacro {
StringRef Name;
StringRef Body;
MCAsmMacroParameters Parameters;

public:
MCAsmMacro(StringRef N, StringRef B, MCAsmMacroParameters P)
: Name(N), Body(B), Parameters(std::move(P)) {}
};
} // namespace llvm

#endif
15 changes: 15 additions & 0 deletions include/llvm/MC/MCContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/MC/MCAsmMacro.h"
#include "llvm/MC/MCDwarf.h"
#include "llvm/MC/MCSubtargetInfo.h"
#include "llvm/MC/SectionKind.h"
Expand Down Expand Up @@ -268,6 +269,9 @@ namespace llvm {
unsigned UniqueID,
const MCSymbolELF *Associated);

/// \brief Map of currently defined macros.
StringMap<MCAsmMacro> MacroMap;

public:
explicit MCContext(const MCAsmInfo *MAI, const MCRegisterInfo *MRI,
const MCObjectFileInfo *MOFI,
Expand Down Expand Up @@ -618,6 +622,17 @@ namespace llvm {
// FIXME: We should really do something about that.
LLVM_ATTRIBUTE_NORETURN void reportFatalError(SMLoc L,
const Twine &Msg);

const MCAsmMacro *lookupMacro(StringRef Name) {
StringMap<MCAsmMacro>::iterator I = MacroMap.find(Name);
return (I == MacroMap.end()) ? nullptr : &I->getValue();
}

void defineMacro(StringRef Name, MCAsmMacro Macro) {
MacroMap.insert(std::make_pair(Name, std::move(Macro)));
}

void undefineMacro(StringRef Name) { MacroMap.erase(Name); }
};

} // end namespace llvm
Expand Down
Loading